<snip>

+vfio_migration_set_state(char *name, uint32_t state) " (%s) state %d"
+vfio_vmstate_change(char *name, int running, const char *reason, uint32_t dev_state) 
" (%s) running %d reason %s device state %d"
diff --git a/include/hw/vfio/vfio-common.h b/include/hw/vfio/vfio-common.h
index 8275c4c68f45..25e3b1a3b90a 100644
--- a/include/hw/vfio/vfio-common.h
+++ b/include/hw/vfio/vfio-common.h
@@ -29,6 +29,7 @@
   #ifdef CONFIG_LINUX
   #include <linux/vfio.h>
   #endif
+#include "sysemu/sysemu.h"
#define VFIO_MSG_PREFIX "vfio %s: " @@ -119,6 +120,9 @@ typedef struct VFIODevice {
       unsigned int flags;
       VFIOMigration *migration;
       Error *migration_blocker;
+    VMChangeStateEntry *vm_state;
+    uint32_t device_state;
+    int vm_running;

Could these be placed in VFIOMigration?  Thanks,

I think device_state should be part of VFIODevice since its about device
rather than only related to migration, others can be moved to VFIOMigration.

But these are only valid when migration is supported and thus when
VFIOMigration exists.  Thanks,


Even though it is used when migration is supported, its device's attribute.

Thanks,
Kirti


Reply via email to