summary refs log tree commit diff stats
path: root/hw/vfio/cpr.c
diff options
context:
space:
mode:
authorSteve Sistare <steven.sistare@oracle.com>2024-09-30 09:31:52 -0700
committerPeter Xu <peterx@redhat.com>2025-10-03 09:48:02 -0400
commitee1ca09fc1e6362ab94e92c25600ae51413d8ee4 (patch)
treedd949cf90619cdc73bcc155df1e808ad870c4f62 /hw/vfio/cpr.c
parent2f9dc012ec31856573009ee922855ba4ab5183a9 (diff)
downloadfocaccia-qemu-ee1ca09fc1e6362ab94e92c25600ae51413d8ee4.tar.gz
focaccia-qemu-ee1ca09fc1e6362ab94e92c25600ae51413d8ee4.zip
vfio: cpr-exec mode
All blockers and notifiers for cpr-transfer mode also apply to cpr-exec.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Acked-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/r/30750362-d4a1-4392-8dd6-016624d01be1@oracle.com
Signed-off-by: Peter Xu <peterx@redhat.com>
Diffstat (limited to 'hw/vfio/cpr.c')
-rw-r--r--hw/vfio/cpr.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/hw/vfio/cpr.c b/hw/vfio/cpr.c
index 2c71fc1e8e..db462aabcb 100644
--- a/hw/vfio/cpr.c
+++ b/hw/vfio/cpr.c
@@ -195,9 +195,10 @@ static int vfio_cpr_kvm_close_notifier(NotifierWithReturn *notifier,
 void vfio_cpr_add_kvm_notifier(void)
 {
     if (!kvm_close_notifier.notify) {
-        migration_add_notifier_mode(&kvm_close_notifier,
-                                    vfio_cpr_kvm_close_notifier,
-                                    MIG_MODE_CPR_TRANSFER);
+        migration_add_notifier_modes(&kvm_close_notifier,
+                                     vfio_cpr_kvm_close_notifier,
+                                     MIG_MODE_CPR_TRANSFER, MIG_MODE_CPR_EXEC,
+                                     -1);
     }
 }
 
@@ -282,9 +283,9 @@ static int vfio_cpr_pci_notifier(NotifierWithReturn *notifier,
 
 void vfio_cpr_pci_register_device(VFIOPCIDevice *vdev)
 {
-    migration_add_notifier_mode(&vdev->cpr.transfer_notifier,
-                                vfio_cpr_pci_notifier,
-                                MIG_MODE_CPR_TRANSFER);
+    migration_add_notifier_modes(&vdev->cpr.transfer_notifier,
+                                 vfio_cpr_pci_notifier,
+                                 MIG_MODE_CPR_TRANSFER, MIG_MODE_CPR_EXEC, -1);
 }
 
 void vfio_cpr_pci_unregister_device(VFIOPCIDevice *vdev)