mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
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>
This commit is contained in:
parent
a9e271ec9b
commit
02a7e71b1e
3 changed files with 166 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue