qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/1] Fix to show vfio migration stat in migration status


From: Kirti Wankhede
Subject: Re: [PATCH 1/1] Fix to show vfio migration stat in migration status
Date: Thu, 26 Nov 2020 00:22:22 +0530
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1



On 11/25/2020 3:00 PM, Dr. David Alan Gilbert wrote:
* Kirti Wankhede (kwankhede@nvidia.com) wrote:
Header file where CONFIG_VFIO is defined is not included in migration.c
file. Include config devices header file in migration.c.

Fixes: 3710586caa5d ("qapi: Add VFIO devices migration stats in Migration
stats")

Signed-off-by: Kirti Wankhede <kwankhede@nvidia.com>

Given it's got build problems; I suggest actually something cleaner
would be to swing populate_vfio_info into one of the vfio specific
files, add a stubs/ entry somewhere and then migration.c doesn't need
to include the device or header stuff.


Still function prototype for populate_vfio_info() and its stub has to be placed in some header file.

Earlier I used CONFIG_LINUX instead of CONFIG_VFIO which works here. Should I change it back to CONFIG_LINUX?

I'm not very much aware of meson build system, I tested by configuring specific target, but I think by default if target build is not specified during configuration, it builds for multiple target that's where this build is failing. Any help on how to fix it would be helpful.

Thanks,
Kirti

Dave

---
  meson.build           | 1 +
  migration/migration.c | 1 +
  2 files changed, 2 insertions(+)

diff --git a/meson.build b/meson.build
index 7ddf983ff7f5..24526499cfb5 100644
--- a/meson.build
+++ b/meson.build
@@ -1713,6 +1713,7 @@ common_ss.add_all(when: 'CONFIG_USER_ONLY', if_true: 
user_ss)
common_all = common_ss.apply(config_all, strict: false)
  common_all = static_library('common',
+                            
c_args:'-DCONFIG_DEVICES="@0@-config-devices.h"'.format(target) ,
                              build_by_default: false,
                              sources: common_all.sources() + genh,
                              dependencies: common_all.dependencies(),
diff --git a/migration/migration.c b/migration/migration.c
index 87a9b59f83f4..650efb81daad 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -57,6 +57,7 @@
  #include "qemu/queue.h"
  #include "multifd.h"
+#include CONFIG_DEVICES
  #ifdef CONFIG_VFIO
  #include "hw/vfio/vfio-common.h"
  #endif
--
2.7.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]