From 0cb51c183a91e882b10ead4ddf2321296a537c47 Mon Sep 17 00:00:00 2001 From: Steve Sistare Date: Thu, 22 Feb 2024 09:28:38 -0800 Subject: vfio: allow cpr-reboot migration if suspended MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Cédric Le Goater --- include/hw/vfio/vfio-container-base.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/hw/vfio/vfio-container-base.h b/include/hw/vfio/vfio-container-base.h index b2813b0..3582d5f 100644 --- a/include/hw/vfio/vfio-container-base.h +++ b/include/hw/vfio/vfio-container-base.h @@ -49,6 +49,7 @@ typedef struct VFIOContainerBase { QLIST_ENTRY(VFIOContainerBase) next; QLIST_HEAD(, VFIODevice) device_list; GList *iova_ranges; + NotifierWithReturn cpr_reboot_notifier; } VFIOContainerBase; typedef struct VFIOGuestIOMMU { -- cgit v1.1