From: Sean Christopherson <seanjc@google.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
Sean Christopherson <seanjc@google.com>
Subject: [GIT PULL] KVM: guest_memfd changes for 6.20
Date: Fri, 6 Feb 2026 20:10:05 -0800 [thread overview]
Message-ID: <20260207041011.913471-4-seanjc@google.com> (raw)
In-Reply-To: <20260207041011.913471-1-seanjc@google.com>
In preparation (pun intended) for in-place conversion, drop gmem's preparation
tracking, GUP source pages outside of filemap invalidate lock to avoid AB-BA
locking, and require source pages to be 4KiB aligned.
Regarding the retroactive alignment requirement, I know we discussed it in PUCK,
but I forget if we ever formalized a decision there. After going over various
VMMs, we gained enough confidence to just bite the bullet and hope for the best.
The following changes since commit 9ace4753a5202b02191d54e9fdf7f9e3d02b85eb:
Linux 6.19-rc4 (2026-01-04 14:41:55 -0800)
are available in the Git repository at:
https://github.com/kvm-x86/linux.git tags/kvm-x86-gmem-6.20
for you to fetch changes up to 2a62345b30529e488beb6a1220577b3495933724:
KVM: guest_memfd: GUP source pages prior to populating guest memory (2026-01-15 12:31:17 -0800)
----------------------------------------------------------------
KVM guest_memfd changes for 6.20
- Remove kvm_gmem_populate()'s preparation tracking and half-baked hugepage
handling, and instead rely on SNP (the only user of the tracking) to do its
own tracking via the RMP.
- Retroactively document and enforce (for SNP) that KVM_SEV_SNP_LAUNCH_UPDATE
and KVM_TDX_INIT_MEM_REGION require the source page to be 4KiB aligned, to
avoid non-trivial complexity for a non-existent usecase (and because
in-place conversion simply can't support unaligned sources).
- When populating guest_memfd memory, GUP the source page in common code and
pass the refcounted page to the vendor callback, instead of letting vendor
code do the heavy lifting. Doing so avoids a looming deadlock bug with
in-place due an AB-BA conflict betwee mmap_lock and guest_memfd's filemap
invalidate lock.
----------------------------------------------------------------
Michael Roth (5):
KVM: guest_memfd: Remove partial hugepage handling from kvm_gmem_populate()
KVM: guest_memfd: Remove preparation tracking
KVM: SEV: Document/enforce page-alignment for KVM_SEV_SNP_LAUNCH_UPDATE
KVM: TDX: Document alignment requirements for KVM_TDX_INIT_MEM_REGION
KVM: guest_memfd: GUP source pages prior to populating guest memory
Yan Zhao (1):
KVM: SVM: Fix a missing kunmap_local() in sev_gmem_post_populate()
.../virt/kvm/x86/amd-memory-encryption.rst | 2 +-
Documentation/virt/kvm/x86/intel-tdx.rst | 2 +-
arch/x86/kvm/svm/sev.c | 108 +++++++---------
arch/x86/kvm/vmx/tdx.c | 16 +--
include/linux/kvm_host.h | 4 +-
virt/kvm/guest_memfd.c | 139 +++++++++++----------
6 files changed, 130 insertions(+), 141 deletions(-)
next prev parent reply other threads:[~2026-02-07 4:10 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-07 4:10 [GIT PULL] KVM: x86 pull requests " Sean Christopherson
2026-02-07 4:10 ` [GIT PULL] KVM: x86: APIC related changes " Sean Christopherson
2026-02-09 18:33 ` Paolo Bonzini
2026-02-07 4:10 ` [GIT PULL] KVM: Generic " Sean Christopherson
2026-02-09 17:38 ` Paolo Bonzini
2026-02-09 17:42 ` Paolo Bonzini
2026-02-10 0:33 ` Sean Christopherson
2026-02-27 23:21 ` Sean Christopherson
2026-02-28 13:56 ` Paolo Bonzini
2026-03-02 14:53 ` Sean Christopherson
2026-02-07 4:10 ` Sean Christopherson [this message]
2026-02-07 4:10 ` [GIT PULL] KVM: x86: Misc " Sean Christopherson
2026-02-09 17:56 ` Paolo Bonzini
2026-02-09 21:19 ` Sean Christopherson
2026-02-07 4:10 ` [GIT PULL] KVM: x86: Mediated PMU " Sean Christopherson
2026-02-09 16:44 ` Sean Christopherson
2026-02-07 4:10 ` [GIT PULL] KVM: selftests changes " Sean Christopherson
2026-02-09 17:46 ` Paolo Bonzini
2026-02-07 4:10 ` [GIT PULL] KVM: x86: SVM " Sean Christopherson
2026-02-09 17:51 ` Paolo Bonzini
2026-02-07 4:10 ` [GIT PULL] KVM: x86: VMX " Sean Christopherson
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=20260207041011.913471-4-seanjc@google.com \
--to=seanjc@google.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.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
all inboxes | Powered by JetHome®