From: Peter Xu <peterx@redhat.com>
To: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Cc: qemu-devel@nongnu.org, "Kevin Wolf" <kwolf@redhat.com>,
"Hanna Reitz" <hreitz@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@mailo.com>,
"Zhao Liu" <zhao1.liu@intel.com>,
"Stefano Stabellini" <sstabellini@kernel.org>,
"Anthony PERARD" <anthony@xenproject.org>,
"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
"Fabiano Rosas" <farosas@suse.de>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Reinoud Zandijk" <reinoud@netbsd.org>,
"Marcelo Tosatti" <mtosatti@redhat.com>,
"Alex Williamson" <alex@shazbot.org>,
"Cédric Le Goater" <clg@redhat.com>,
qemu-block@nongnu.org, xen-devel@lists.xenproject.org,
kvm@vger.kernel.org
Subject: Re: [PATCH 0/3] migration/ram: Abort on unsupported migratable RAM changes
Date: Mon, 22 Jun 2026 16:23:09 -0400 [thread overview]
Message-ID: <ajmZrT1d0QXCWTNq@x1.local> (raw)
In-Reply-To: <20260611-ram-v1-0-a2dacf699718@rsg.ci.i.u-tokyo.ac.jp>
On Thu, Jun 11, 2026 at 03:35:47PM +0900, Akihiko Odaki wrote:
> Supersedes: <20260604-migration-v1-1-cef4a5b1bbdd@rsg.ci.i.u-tokyo.ac.jp>
> ("[PATCH] system/physmem: Assert migration invariants")
>
> ram_mig_ram_block_resized() already aborts migration when migratable RAM
> is resized. Extend the same handling to other unsupported changes to the
> migratable RAMBlock set, such as removing a migratable RAMBlock or
> changing a RAMBlock's migratable state.
>
> Signed-off-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
> ---
> Akihiko Odaki (3):
> system/physmem: Pass RAMBlock to RAMBlockNotifier callbacks
> system/physmem: Notify RAMBlock migratable and idstr changes
> migration/ram: Abort on unsupported migratable RAM changes
Thanks for looking at this, Akihiko.
I understand this is a protection to the system to trap error use cases.
The question I have is do we have any possible way to trigger these.
I worry we add a bunch of code and notifiers, and then there's zero way to
trigger, essentially add dead code.
Logically we could already add assert() on things we don't expect to
happen. This case might be slightly risky, but still I think we can also
consider things like error_report_once() instead of introducing slightly
complex notifiers just to cover what we think shouldn't happen.
Or do you have way to trigger any of these notifiers?
PS: today I went back and I wanted to try how the existing resize()
notifier would trigger, I can't even reproduce it with David's example
here:
https://lore.kernel.org/qemu-devel/20210429112708.12291-1-david@redhat.com/#t
I can trap a qemu_ram_resize(), but that's invoked with newsize==rb->size,
so it didn't really notify a thing. I don't really know how to trigger
ram_block_notify_resize(). If you know, please share.
Thanks,
--
Peter Xu
next prev parent reply other threads:[~2026-06-22 20:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-11 6:35 [PATCH 0/3] migration/ram: Abort on unsupported migratable RAM changes Akihiko Odaki
2026-06-11 6:35 ` [PATCH 1/3] system/physmem: Pass RAMBlock to RAMBlockNotifier callbacks Akihiko Odaki
2026-06-11 6:35 ` [PATCH 2/3] system/physmem: Notify RAMBlock migratable and idstr changes Akihiko Odaki
2026-06-11 6:35 ` [PATCH 3/3] migration/ram: Abort on unsupported migratable RAM changes Akihiko Odaki
2026-06-22 20:23 ` Peter Xu [this message]
2026-06-23 12:05 ` [PATCH 0/3] " Akihiko Odaki
2026-06-23 15:45 ` Peter Xu
2026-06-23 16:38 ` Akihiko Odaki
2026-06-29 18:21 ` Peter Xu
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=ajmZrT1d0QXCWTNq@x1.local \
--to=peterx@redhat.com \
--cc=alex@shazbot.org \
--cc=anthony@xenproject.org \
--cc=clg@redhat.com \
--cc=edgar.iglesias@gmail.com \
--cc=farosas@suse.de \
--cc=hreitz@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=kwolf@redhat.com \
--cc=mtosatti@redhat.com \
--cc=odaki@rsg.ci.i.u-tokyo.ac.jp \
--cc=pbonzini@redhat.com \
--cc=philmd@mailo.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=reinoud@netbsd.org \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.org \
--cc=zhao1.liu@intel.com \
/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