qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Steven Sistare <steven.sistare@oracle.com>
To: Peter Xu <peterx@redhat.com>
Cc: qemu-devel@nongnu.org, Fabiano Rosas <farosas@suse.de>,
	Markus Armbruster <armbru@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Eric Blake <eblake@redhat.com>,
	"Dr. David Alan Gilbert" <dave@treblig.org>,
	Cedric Le Goater <clg@redhat.com>,
	Alex Williamson <alex.williamson@redhat.com>
Subject: Re: [PATCH V5 00/19] Live update: cpr-exec
Date: Thu, 2 Oct 2025 08:44:21 -0400	[thread overview]
Message-ID: <30750362-d4a1-4392-8dd6-016624d01be1@oracle.com> (raw)
In-Reply-To: <aN2Je6JssrN1otuQ@x1.local>

[-- Attachment #1: Type: text/plain, Size: 712 bytes --]

On 10/1/2025 4:05 PM, Peter Xu wrote:
> On Wed, Oct 01, 2025 at 03:24:44PM -0400, Steven Sistare wrote:
>> Actually that was easy to resolve, not worth a V6?
>>
>> In patch "vfio: cpr-exec mode", drop the change in container.c, and instead
>> add MIG_MODE_CPR_EXEC to container-legacy.c here:
>>
>>          if (migrate_add_blocker_modes(&vbasedev->cpr.mdev_blocker, errp,
>>                                        MIG_MODE_CPR_TRANSFER, MIG_MODE_CPR_EXEC,
>>                                        -1) < 0) {
> 
> If that's the only conflict, could I request to send that new vfio patch
> only, by replying it to this email or that vfio patch?

see attached.

> I can fix the win build.

Cool, thanks!

- Steve

[-- Attachment #2: 0001-vfio-cpr-exec-mode.patch --]
[-- Type: text/plain, Size: 4449 bytes --]

From b35a588d6c6d0db31a5032f213a48243c970b588 Mon Sep 17 00:00:00 2001
From: Steve Sistare <steven.sistare@oracle.com>
Date: Mon, 30 Sep 2024 09:31:52 -0700
Subject: [PATCH] vfio: cpr-exec mode
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

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>
---
 hw/vfio/container-legacy.c |  3 ++-
 hw/vfio/cpr-iommufd.c      |  3 ++-
 hw/vfio/cpr-legacy.c       |  9 +++++----
 hw/vfio/cpr.c              | 13 +++++++------
 4 files changed, 16 insertions(+), 12 deletions(-)

diff --git a/hw/vfio/container-legacy.c b/hw/vfio/container-legacy.c
index c0f87f7..c0540f2 100644
--- a/hw/vfio/container-legacy.c
+++ b/hw/vfio/container-legacy.c
@@ -990,7 +990,8 @@ static bool vfio_legacy_attach_device(const char *name, VFIODevice *vbasedev,
         error_setg(&vbasedev->cpr.mdev_blocker,
                    "CPR does not support vfio mdev %s", vbasedev->name);
         if (migrate_add_blocker_modes(&vbasedev->cpr.mdev_blocker, errp,
-                                      MIG_MODE_CPR_TRANSFER, -1) < 0) {
+                                      MIG_MODE_CPR_TRANSFER, MIG_MODE_CPR_EXEC,
+                                      -1) < 0) {
             goto hiod_unref_exit;
         }
     }
diff --git a/hw/vfio/cpr-iommufd.c b/hw/vfio/cpr-iommufd.c
index 1d70c87..8a4d65d 100644
--- a/hw/vfio/cpr-iommufd.c
+++ b/hw/vfio/cpr-iommufd.c
@@ -159,7 +159,8 @@ bool vfio_iommufd_cpr_register_iommufd(IOMMUFDBackend *be, Error **errp)
 
     if (!vfio_cpr_supported(be, cpr_blocker)) {
         return migrate_add_blocker_modes(cpr_blocker, errp,
-                                         MIG_MODE_CPR_TRANSFER, -1) == 0;
+                                         MIG_MODE_CPR_TRANSFER,
+                                         MIG_MODE_CPR_EXEC, -1) == 0;
     }
 
     vmstate_register(NULL, -1, &iommufd_cpr_vmstate, be);
diff --git a/hw/vfio/cpr-legacy.c b/hw/vfio/cpr-legacy.c
index bbf7a0d..1a16cb1 100644
--- a/hw/vfio/cpr-legacy.c
+++ b/hw/vfio/cpr-legacy.c
@@ -179,16 +179,17 @@ bool vfio_legacy_cpr_register_container(VFIOLegacyContainer *container,
 
     if (!vfio_cpr_supported(container, cpr_blocker)) {
         return migrate_add_blocker_modes(cpr_blocker, errp,
-                                         MIG_MODE_CPR_TRANSFER, -1) == 0;
+                                         MIG_MODE_CPR_TRANSFER,
+                                         MIG_MODE_CPR_EXEC, -1) == 0;
     }
 
     vfio_cpr_add_kvm_notifier();
 
     vmstate_register(NULL, -1, &vfio_container_vmstate, container);
 
-    migration_add_notifier_mode(&container->cpr.transfer_notifier,
-                                vfio_cpr_fail_notifier,
-                                MIG_MODE_CPR_TRANSFER);
+    migration_add_notifier_modes(&container->cpr.transfer_notifier,
+                                 vfio_cpr_fail_notifier,
+                                 MIG_MODE_CPR_TRANSFER, MIG_MODE_CPR_EXEC, -1);
     return true;
 }
 
diff --git a/hw/vfio/cpr.c b/hw/vfio/cpr.c
index 2c71fc1..db462aa 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)
-- 
1.8.3.1


  reply	other threads:[~2025-10-02 12:47 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-01 15:33 [PATCH V5 00/19] Live update: cpr-exec Steve Sistare
2025-10-01 15:33 ` [PATCH V5 01/19] migration: multi-mode notifier Steve Sistare
2025-10-01 15:33 ` [PATCH V5 02/19] migration: add cpr_walk_fd Steve Sistare
2025-10-01 15:33 ` [PATCH V5 03/19] oslib: qemu_clear_cloexec Steve Sistare
2025-10-01 15:33 ` [PATCH V5 04/19] migration: cpr-exec-command parameter Steve Sistare
2025-10-01 15:33 ` [PATCH V5 05/19] migration: cpr-exec save and load Steve Sistare
2025-10-01 16:36   ` Peter Xu
2025-10-01 15:33 ` [PATCH V5 06/19] migration: cpr-exec mode Steve Sistare
2025-10-01 15:33 ` [PATCH V5 07/19] migration: cpr-exec docs Steve Sistare
2025-10-01 15:34 ` [PATCH V5 08/19] vfio: cpr-exec mode Steve Sistare
2025-10-01 15:34 ` [PATCH V5 09/19] tests/qtest: export qtest_qemu_binary Steve Sistare
2025-10-01 15:34 ` [PATCH V5 10/19] tests/qtest: qtest_qemu_args Steve Sistare
2025-10-01 15:34 ` [PATCH V5 11/19] tests/qtest: qtest_create_test_state Steve Sistare
2025-10-01 15:34 ` [PATCH V5 12/19] tests/qtest: qtest_qemu_spawn_func Steve Sistare
2025-10-01 15:34 ` [PATCH V5 13/19] tests/qtest: qtest_init_after_exec Steve Sistare
2025-10-01 15:34 ` [PATCH V5 14/19] migration-test: only_source option Steve Sistare
2025-10-01 15:34 ` [PATCH V5 15/19] migration-test: shm path accessor Steve Sistare
2025-10-01 15:34 ` [PATCH V5 16/19] migration-test: misc exports Steve Sistare
2025-10-01 15:34 ` [PATCH V5 17/19] migration-test: migrate_args Steve Sistare
2025-10-01 15:34 ` [PATCH V5 18/19] migration-test: strv parameter Steve Sistare
2025-10-01 15:34 ` [PATCH V5 19/19] migration-test: test cpr-exec Steve Sistare
2025-10-01 18:56 ` [PATCH V5 00/19] Live update: cpr-exec Peter Xu
2025-10-01 19:07   ` Steven Sistare
2025-10-01 19:24     ` Steven Sistare
2025-10-01 20:05       ` Peter Xu
2025-10-02 12:44         ` Steven Sistare [this message]
2025-10-02  8:48       ` Cédric Le Goater
2025-10-01 20:03     ` Peter Xu
2025-10-02  8:50       ` Cédric Le Goater
2025-10-02 13:45         ` Steven Sistare
2025-10-02 13:44       ` Steven Sistare
2025-10-03 11:36         ` Steven Sistare
2025-10-03 13:11           ` Peter Xu
2025-10-03 13:36             ` Steven Sistare

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=30750362-d4a1-4392-8dd6-016624d01be1@oracle.com \
    --to=steven.sistare@oracle.com \
    --cc=alex.williamson@redhat.com \
    --cc=armbru@redhat.com \
    --cc=clg@redhat.com \
    --cc=dave@treblig.org \
    --cc=eblake@redhat.com \
    --cc=farosas@suse.de \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).