aboutsummaryrefslogtreecommitdiff
path: root/include/hw
diff options
context:
space:
mode:
authorJoao Martins <joao.m.martins@oracle.com>2023-08-02 11:14:47 +0300
committerCédric Le Goater <clg@redhat.com>2023-09-11 08:34:05 +0200
commit3d4d0f0e06630d0098e7940323fe0f96ff87f34f (patch)
tree50d5200e9a37b4a65bd7869c28e046b4bef6378a /include/hw
parent02b2e25360ea1f10a337ddaf686eb770eebf59de (diff)
downloadqemu-3d4d0f0e06630d0098e7940323fe0f96ff87f34f.zip
qemu-3d4d0f0e06630d0098e7940323fe0f96ff87f34f.tar.gz
qemu-3d4d0f0e06630d0098e7940323fe0f96ff87f34f.tar.bz2
vfio/migration: Refactor PRE_COPY and RUNNING state checks
Move the PRE_COPY and RUNNING state checks to helper functions. This is in preparation for adding P2P VFIO migration support, where these helpers will also test for PRE_COPY_P2P and RUNNING_P2P states. Signed-off-by: Joao Martins <joao.m.martins@oracle.com> Signed-off-by: Avihai Horon <avihaih@nvidia.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Tested-by: YangHang Liu <yanghliu@redhat.com> Signed-off-by: Cédric Le Goater <clg@redhat.com>
Diffstat (limited to 'include/hw')
-rw-r--r--include/hw/vfio/vfio-common.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/hw/vfio/vfio-common.h b/include/hw/vfio/vfio-common.h
index da43d27..e9b8954 100644
--- a/include/hw/vfio/vfio-common.h
+++ b/include/hw/vfio/vfio-common.h
@@ -230,6 +230,8 @@ void vfio_unblock_multiple_devices_migration(void);
bool vfio_viommu_preset(VFIODevice *vbasedev);
int64_t vfio_mig_bytes_transferred(void);
void vfio_reset_bytes_transferred(void);
+bool vfio_device_state_is_running(VFIODevice *vbasedev);
+bool vfio_device_state_is_precopy(VFIODevice *vbasedev);
#ifdef CONFIG_LINUX
int vfio_get_region_info(VFIODevice *vbasedev, int index,