From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Prasad Pandit <ppandit@redhat.com>
Cc: Ani Sinha <anisinha@redhat.com>, Peter Xu <peterx@redhat.com>,
Fabiano Rosas <farosas@suse.de>,
kraxel@redhat.com, pbonzini@redhat.com, ani@anisinha.ca,
Prasad Pandit <pjp@fedoraproject.org>,
qemu-devel@nongnu.org
Subject: Re: [PATCH v6 35/35] migration: return EEXIST when trying to add the same migration blocker
Date: Wed, 25 Feb 2026 09:07:28 +0000 [thread overview]
Message-ID: <aZ670CAG40j1r2PJ@redhat.com> (raw)
In-Reply-To: <CAE8KmOyjB1NEtBVQ2QDiDZrPoem3eTWEi-Ht_mJZQNa-H=5iNQ@mail.gmail.com>
On Wed, Feb 25, 2026 at 11:35:15AM +0530, Prasad Pandit wrote:
> On Wed, 25 Feb 2026 at 09:23, Ani Sinha <anisinha@redhat.com> wrote:
> > Currently the code that adds a migration blocker does not check if the same
> > blocker already exists. Return an EEXIST error code if there is an attempt to
> > add the same migration blocker again. This way the same migration blocker will
> > not get added twice.
> >
> > Suggested-by: Prasad Pandit <pjp@fedoraproject.org>
> > Signed-off-by: Ani Sinha <anisinha@redhat.com>
> > ---
> > migration/migration.c | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/migration/migration.c b/migration/migration.c
> > index a5b0465ed3..1eb75fb7fb 100644
> > --- a/migration/migration.c
> > +++ b/migration/migration.c
> > @@ -1702,6 +1702,10 @@ static int add_blockers(Error **reasonp, unsigned modes, Error **errp)
This method has an '**errp' parameter.....
> > {
> > for (MigMode mode = 0; mode < MIG_MODE__MAX; mode++) {
> > if (modes & BIT(mode)) {
> > + if (g_slist_index(migration_blockers[mode],
> > + *reasonp) >= 0) {
> > + return -EEXIST;
.... so using -errno for return values is not appropriate - it must
set 'errp' and return -1.
> > + }
> > migration_blockers[mode] = g_slist_prepend(migration_blockers[mode],
> > *reasonp);
> > }
>
> * Looks okay.
> Reviewed-by: Prasad Pandit <pjp@fedoraproject.org>
>
> Thank you.
> ---
> - Prasad
>
>
With regards,
Daniel
--
|: https://berrange.com ~~ https://hachyderm.io/@berrange :|
|: https://libvirt.org ~~ https://entangle-photo.org :|
|: https://pixelfed.art/berrange ~~ https://fstop138.berrange.com :|
next prev parent reply other threads:[~2026-02-25 9:08 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-25 3:49 [PATCH v6 00/35] Introduce support for confidential guest reset (x86) Ani Sinha
2026-02-25 3:49 ` [PATCH v6 01/35] i386/kvm: avoid installing duplicate msr entries in msr_handlers Ani Sinha
2026-02-25 3:49 ` [PATCH v6 02/35] accel/kvm: add confidential class member to indicate guest rebuild capability Ani Sinha
2026-02-25 3:49 ` [PATCH v6 03/35] hw/accel: add a per-accelerator callback to change VM accelerator handle Ani Sinha
2026-02-25 3:49 ` [PATCH v6 04/35] system/physmem: add helper to reattach existing memory after KVM VM fd change Ani Sinha
2026-02-25 3:49 ` [PATCH v6 05/35] accel/kvm: add changes required to support KVM VM file descriptor change Ani Sinha
2026-02-25 3:49 ` [PATCH v6 06/35] accel/kvm: mark guest state as unprotected after vm " Ani Sinha
2026-02-25 3:49 ` [PATCH v6 07/35] accel/kvm: add a notifier to indicate KVM VM file descriptor has changed Ani Sinha
2026-02-25 3:49 ` [PATCH v6 08/35] accel/kvm: notify when KVM VM file fd is about to be changed Ani Sinha
2026-02-25 3:49 ` [PATCH v6 09/35] i386/kvm: unregister smram listeners prior to vm file descriptor change Ani Sinha
2026-02-25 3:49 ` [PATCH v6 10/35] kvm/i386: implement architecture support for kvm " Ani Sinha
2026-02-25 3:49 ` [PATCH v6 11/35] i386/kvm: refactor xen init into a new function Ani Sinha
2026-02-25 3:49 ` [PATCH v6 12/35] hw/i386: refactor x86_bios_rom_init for reuse in confidential guest reset Ani Sinha
2026-02-25 3:49 ` [PATCH v6 13/35] hw/i386: export a new function x86_bios_rom_reload Ani Sinha
2026-02-25 3:49 ` [PATCH v6 14/35] kvm/i386: reload firmware for confidential guest reset Ani Sinha
2026-02-25 3:49 ` [PATCH v6 15/35] accel/kvm: rebind current VCPUs to the new KVM VM file descriptor upon reset Ani Sinha
2026-02-25 3:49 ` [PATCH v6 16/35] i386/tdx: refactor TDX firmware memory initialization code into a new function Ani Sinha
2026-02-25 3:49 ` [PATCH v6 17/35] i386/tdx: finalize TDX guest state upon reset Ani Sinha
2026-02-25 3:49 ` [PATCH v6 18/35] i386/tdx: add a pre-vmfd change notifier to reset tdx state Ani Sinha
2026-02-25 3:49 ` [PATCH v6 19/35] i386/sev: add migration blockers only once Ani Sinha
2026-02-25 3:49 ` [PATCH v6 20/35] i386/sev: add notifiers " Ani Sinha
2026-02-25 3:49 ` [PATCH v6 21/35] i386/sev: free existing launch update data and kernel hashes data on init Ani Sinha
2026-02-25 3:49 ` [PATCH v6 22/35] i386/sev: add support for confidential guest reset Ani Sinha
2026-02-25 3:49 ` [PATCH v6 23/35] hw/vfio: generate new file fd for pseudo device and rebind existing descriptors Ani Sinha
2026-02-27 7:02 ` Cédric Le Goater
2026-02-27 7:28 ` Ani Sinha
2026-02-25 3:49 ` [PATCH v6 24/35] kvm/i8254: refactor pit initialization into a helper Ani Sinha
2026-02-25 3:49 ` [PATCH v6 25/35] kvm/i8254: add support for confidential guest reset Ani Sinha
2026-02-25 3:49 ` [PATCH v6 26/35] kvm/hyperv: add synic feature to CPU only if its not enabled Ani Sinha
2026-02-25 3:49 ` [PATCH v6 27/35] hw/hyperv/vmbus: add support for confidential guest reset Ani Sinha
2026-02-25 3:49 ` [PATCH v6 28/35] kvm/xen-emu: re-initialize capabilities during " Ani Sinha
2026-02-25 3:49 ` [PATCH v6 29/35] ppc/openpic: create a new openpic device and reattach mem region on coco reset Ani Sinha
2026-02-25 3:49 ` [PATCH v6 30/35] kvm/vcpu: add notifiers to inform vcpu file descriptor change Ani Sinha
2026-02-25 3:49 ` [PATCH v6 31/35] kvm/clock: add support for confidential guest reset Ani Sinha
2026-02-25 3:49 ` [PATCH v6 32/35] hw/machine: introduce machine specific option 'x-change-vmfd-on-reset' Ani Sinha
2026-02-25 3:49 ` [PATCH v6 33/35] tests/functional/x86_64: add functional test to exercise vm fd change on reset Ani Sinha
2026-02-25 3:49 ` [PATCH v6 34/35] qom: add 'confidential-guest-reset' property for x86 confidential vms Ani Sinha
2026-02-25 3:49 ` [PATCH v6 35/35] migration: return EEXIST when trying to add the same migration blocker Ani Sinha
2026-02-25 6:05 ` Prasad Pandit
2026-02-25 9:07 ` Daniel P. Berrangé [this message]
2026-02-25 9:32 ` Markus Armbruster
2026-02-25 9:45 ` Ani Sinha
2026-02-25 10:04 ` Daniel P. Berrangé
2026-02-25 9:34 ` Ani Sinha
2026-02-25 9:41 ` Daniel P. Berrangé
2026-02-25 17:29 ` Peter Xu
2026-02-26 3:46 ` Ani Sinha
2026-02-26 13:08 ` Peter Xu
2026-02-26 16:14 ` Ani Sinha
2026-03-02 11:28 ` Prasad Pandit
2026-03-02 20:01 ` Peter Xu
2026-03-03 10:51 ` Ani Sinha
2026-03-09 4:29 ` Ani Sinha
2026-02-26 17:23 ` Paolo Bonzini
2026-02-27 3:19 ` Ani Sinha
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=aZ670CAG40j1r2PJ@redhat.com \
--to=berrange@redhat.com \
--cc=ani@anisinha.ca \
--cc=anisinha@redhat.com \
--cc=farosas@suse.de \
--cc=kraxel@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peterx@redhat.com \
--cc=pjp@fedoraproject.org \
--cc=ppandit@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.