]> git.proxmox.com Git - mirror_qemu.git/commit
vfio: allow cpr-reboot migration if suspended
authorSteve Sistare <steven.sistare@oracle.com>
Thu, 22 Feb 2024 17:28:38 +0000 (09:28 -0800)
committerCédric Le Goater <clg@redhat.com>
Fri, 8 Mar 2024 21:10:13 +0000 (22:10 +0100)
commit0cb51c183a91e882b10ead4ddf2321296a537c47
tree8f82a28bb1786ccfd0d1e6f8d2a116e69149c026
parentd9fa4223b30ab881cc2f506fda1fc6a86aad5529
vfio: allow cpr-reboot migration if suspended

Allow cpr-reboot for vfio if the guest is in the suspended runstate.  The
guest drivers' suspend methods flush outstanding requests and re-initialize
the devices, and thus there is no device state to save and restore.  The
user is responsible for suspending the guest before initiating cpr, such as
by issuing guest-suspend-ram to the qemu guest agent.

Relax the vfio blocker so it does not apply to cpr, and add a notifier that
verifies the guest is suspended.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
hw/vfio/common.c
hw/vfio/cpr.c
hw/vfio/migration.c
include/hw/vfio/vfio-container-base.h