qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v26 05/17] vfio: Add VM state change handler to know state of


From: Kirti Wankhede
Subject: Re: [PATCH v26 05/17] vfio: Add VM state change handler to know state of VM
Date: Sun, 18 Oct 2020 23:13:39 +0530
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0

<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

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