From: Peter Xu <peterx@redhat.com>
To: Michael Roth <michael.roth@amd.com>
Cc: qemu-devel@nongnu.org, jmarcin@redhat.com, david@kernel.org,
pbonzini@redhat.com, chenyi.qiang@intel.com, farosas@suse.de,
aik@amd.com, xiaoyao.li@intel.com,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@mailo.com>
Subject: Re: [PATCH v4 00/12] KVM/hostmem: Support init-shared guest-memfd as VM backends
Date: Mon, 24 Aug 2026 09:17:48 -0400 [thread overview]
Message-ID: <aoxEfKoYWtdOSwH_@x1.local> (raw)
In-Reply-To: <3fwr25hmoz7yicoh3o3x3ldeweapn2tbn4dnji67hgrnz7l5bh@rs7gqotxraef>
On Sun, Aug 23, 2026 at 10:52:13AM -0500, Michael Roth wrote:
> On Fri, Aug 21, 2026 at 10:18:26AM -0400, Peter Xu wrote:
> > On Wed, Aug 12, 2026 at 03:16:38PM -0500, Michael Roth wrote:
> > > v1: https://lore.kernel.org/r/20251023185913.2923322-1-peterx@redhat.com
> > > v2: https://lore.kernel.org/r/20251119172913.577392-1-peterx@redhat.com
> > > v3: https://lore.kernel.org/r/20251215205203.1185099-1-peterx@redhat.com/
> > > v4:
> > > - Picked up v3 series from Peter Xu and rebased on 11.1.0
> > > - Collected pending Reviewed-by's
> > > - Per-patch changes:
> > > [01/12] Fix blank space (Xiaoyao)
> > > Fix commit message typos
> > > [02/12] Drop duplicated error-handling for capability checks
> > > [05/12] Fix up commit message, disambigurate "in-place" terminology (Xiaoyao)
> > > [07/12] Fix up commit message, disambigurate "in-place" terminology (Xiaoyao)
> > > [08/12] Disallow 'seal' and 'hugetlb' options based on guest-memfd=on
> > > Fix minor typo in comment
> > > [11/12] Fix up typo in g_test_skip() reason
> > > Pending: Move kvm_guest_memfd_init_shared_supported() to
> > > migration-util.c (Fabiano)
> > >
> > > This patchset is also available at:
> > >
> > > https://github.com/amdese/qemu/commits/gmem-shared-mem-v4
> > >
> > > and is based on top of v11.1.0
> >
> > Should I just pick this up? I'll touch up the commit log that Phil
> > requested. Objections welcomed before next week.
>
> Hi Peter,
Hi, Michael,
>
> No objection here, although I'll be posting new version of the in-place
> conversion support later this week (~Wed-ish) and was planning to an
> updated version of this series roughly the same time so which ever way
> is best for you.
>
> If you do post one though there's also the missing 'return false' and
> dropping the seal=off enforcement that Daniel noticed before we started
> talking about introspection fun.
I didn't mean to repost this series, I meant to pick it up for a pull.
Sorry if it was confusing..
I want to make sure balls are rolling. From our side, we weren't rush on
this one to land, as we'll need to wait for 1G to settle anyway, but if we
have others (like your in-place series upcoming) pending, I think we should
just land it sooner.
You're right, we need to fix things, I noticed it right after I sent the
email and then I found CI / unit test failing.. but I haven't got a chance
to say.. If you repost please check migration-test with --full, otherwise
the gmemfd test will be skipped.
I have two fixups queued locally, I'll attach it here, please use it
whatever way you like, I'll wait for your repost. NOTE: I touched up the
hugetlb failure message when I fixed it up myself, but since you'll repost
you can decide; please just treat it as a comment then, I just think the
new err message is less strong because we will support it.
Thanks,
===8<===
From 0a0dd0f808d4f668ac099945ab35a981e1a07bfb Mon Sep 17 00:00:00 2001
From: Peter Xu <peterx@redhat.com>
Date: Fri, 21 Aug 2026 12:16:15 -0400
Subject: [PATCH 1/2] fixup! hostmem: Support fully shared guest memfd to back
a VM
Signed-off-by: Peter Xu <peterx@redhat.com>
---
backends/hostmem-memfd.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/backends/hostmem-memfd.c b/backends/hostmem-memfd.c
index fbe65b00be..6576331441 100644
--- a/backends/hostmem-memfd.c
+++ b/backends/hostmem-memfd.c
@@ -57,14 +57,16 @@ memfd_backend_memory_alloc(HostMemoryBackend *backend, Error **errp)
}
if (m->guest_memfd) {
+ /*
+ * NOTE: guest-memfd ignores seal=on/off because it always
+ * implicitly seals the FD by definition.
+ */
if (!backend->share) {
error_setg(errp, "guest-memfd=on must be used with share=on");
return false;
- } else if (m->seal) {
- error_setg(errp, "guest-memfd=on must be used with seal=off");
- return false;
} else if (m->hugetlb) {
- error_setg(errp, "guest-memfd=on must be used with hugetlb=off");
+ error_setg(errp, "guest-memfd=on doesn't support hugetlb=on yet");
+ return false;
}
fd = kvm_create_guest_memfd(backend->size,
--
2.54.0
From 66ac7b3f2268430106bfe8034ef8460215e9db91 Mon Sep 17 00:00:00 2001
From: Peter Xu <peterx@redhat.com>
Date: Fri, 21 Aug 2026 13:00:09 -0400
Subject: [PATCH 2/2] fixup! tests/migration-test: Add a precopy test for
guest-memfd
Signed-off-by: Peter Xu <peterx@redhat.com>
---
tests/qtest/migration/precopy-tests.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/tests/qtest/migration/precopy-tests.c b/tests/qtest/migration/precopy-tests.c
index 8146f37d61..d57ffcac23 100644
--- a/tests/qtest/migration/precopy-tests.c
+++ b/tests/qtest/migration/precopy-tests.c
@@ -184,7 +184,6 @@ static void test_precopy_tcp_plain(char *name, MigrateCommon *args)
static void test_precopy_tcp_plain_gmemfd(char *name, MigrateCommon *args)
{
- args->uri = "tcp:127.0.0.1:0";
args->start.mem_type = MEM_TYPE_GUEST_MEMFD;
test_precopy_common(args);
--
2.54.0
--
Peter Xu
next prev parent reply other threads:[~2026-08-24 13:18 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-12 20:16 [PATCH v4 00/12] KVM/hostmem: Support init-shared guest-memfd as VM backends Michael Roth
2026-08-12 20:16 ` [PATCH v4 01/12] kvm: Decouple memory attribute check from kvm_guest_memfd_supported Michael Roth
2026-08-12 20:16 ` [PATCH v4 02/12] kvm: Detect guest-memfd flags supported Michael Roth
2026-08-12 20:16 ` [PATCH v4 03/12] kvm: Provide explicit error for kvm_create_guest_memfd() Michael Roth
2026-08-14 5:56 ` Philippe Mathieu-Daudé
2026-08-14 12:44 ` Peter Xu
2026-08-17 4:05 ` Philippe Mathieu-Daudé
2026-08-17 12:44 ` Peter Xu
2026-08-17 15:05 ` Philippe Mathieu-Daudé
2026-08-12 20:16 ` [PATCH v4 04/12] ramblock: Rename guest_memfd to guest_memfd_private Michael Roth
2026-08-12 20:16 ` [PATCH v4 05/12] memory: Rename RAM_GUEST_MEMFD to RAM_GUEST_MEMFD_PRIVATE Michael Roth
2026-08-12 20:16 ` [PATCH v4 06/12] memory: Rename memory_region_has_guest_memfd() to *_private() Michael Roth
2026-08-12 20:16 ` [PATCH v4 07/12] hostmem: Rename guest_memfd to guest_memfd_private Michael Roth
2026-08-12 20:16 ` [PATCH v4 08/12] hostmem: Support fully shared guest memfd to back a VM Michael Roth
2026-08-13 8:24 ` Daniel P. Berrangé
2026-08-13 12:28 ` Peter Xu
2026-08-13 12:48 ` Daniel P. Berrangé
2026-08-13 14:06 ` Peter Xu
2026-08-14 15:19 ` Daniel P. Berrangé
2026-08-17 13:01 ` Peter Xu
2026-08-23 15:33 ` Michael Roth via qemu development
2026-08-24 12:58 ` Peter Xu
2026-08-25 2:04 ` Michael Roth
2026-08-13 22:10 ` Michael Roth via qemu development
2026-08-14 15:27 ` Daniel P. Berrangé
2026-08-17 13:43 ` Peter Xu
2026-08-12 20:16 ` [PATCH v4 09/12] machine: Rename machine_require_guest_memfd() to *_private() Michael Roth
2026-08-12 20:16 ` [PATCH v4 10/12] memory: Rename memory_region_init_ram_guest_memfd() " Michael Roth
2026-08-12 20:16 ` [PATCH v4 11/12] tests/migration-test: Support guest-memfd init shared mem type Michael Roth
2026-08-12 20:16 ` [PATCH v4 12/12] tests/migration-test: Add a precopy test for guest-memfd Michael Roth
2026-08-21 14:18 ` [PATCH v4 00/12] KVM/hostmem: Support init-shared guest-memfd as VM backends Peter Xu
2026-08-23 15:52 ` Michael Roth
2026-08-24 13:17 ` Peter Xu [this message]
2026-08-25 2:20 ` Michael Roth
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=aoxEfKoYWtdOSwH_@x1.local \
--to=peterx@redhat.com \
--cc=aik@amd.com \
--cc=berrange@redhat.com \
--cc=chenyi.qiang@intel.com \
--cc=david@kernel.org \
--cc=farosas@suse.de \
--cc=jmarcin@redhat.com \
--cc=michael.roth@amd.com \
--cc=pbonzini@redhat.com \
--cc=philmd@mailo.com \
--cc=qemu-devel@nongnu.org \
--cc=xiaoyao.li@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 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.