aboutsummaryrefslogtreecommitdiff
path: root/include/hw/vfio/vfio-common.h
diff options
context:
space:
mode:
authorKirti Wankhede <kwankhede@nvidia.com>2020-10-26 15:06:15 +0530
committerAlex Williamson <alex.williamson@redhat.com>2020-11-01 12:30:50 -0700
commit02a7e71b1e5b1313060927e7c86a10be2d7083a7 (patch)
treeb7be495a9c2ab9d141a12f4536a95b74d05ddcc0 /include/hw/vfio/vfio-common.h
parenta9e271ec9b36ef4c7b5bc3b234c85d93931e192e (diff)
vfio: Add VM state change handler to know state of VM
VM state change handler is called on change in VM's state. Based on VM state, VFIO device state should be changed. Added read/write helper functions for migration region. Added function to set device_state. Signed-off-by: Kirti Wankhede <kwankhede@nvidia.com> Reviewed-by: Neo Jia <cjia@nvidia.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> [aw: lx -> HWADDR_PRIx, remove redundant parens] Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'include/hw/vfio/vfio-common.h')
-rw-r--r--include/hw/vfio/vfio-common.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/hw/vfio/vfio-common.h b/include/hw/vfio/vfio-common.h
index 8275c4c68f..9a571f1fb5 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: "
@@ -58,7 +59,10 @@ typedef struct VFIORegion {
} VFIORegion;
typedef struct VFIOMigration {
+ VMChangeStateEntry *vm_state;
VFIORegion region;
+ uint32_t device_state;
+ int vm_running;
} VFIOMigration;
typedef struct VFIOAddressSpace {