]> git.proxmox.com Git - mirror_qemu.git/commit
vfio/migration: Refactor PRE_COPY and RUNNING state checks
authorJoao Martins <joao.m.martins@oracle.com>
Wed, 2 Aug 2023 08:14:47 +0000 (11:14 +0300)
committerCédric Le Goater <clg@redhat.com>
Mon, 11 Sep 2023 06:34:05 +0000 (08:34 +0200)
commit3d4d0f0e06630d0098e7940323fe0f96ff87f34f
tree50d5200e9a37b4a65bd7869c28e046b4bef6378a
parent02b2e25360ea1f10a337ddaf686eb770eebf59de
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>
hw/vfio/common.c
hw/vfio/migration.c
include/hw/vfio/vfio-common.h