[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260207041011.913471-4-seanjc@google.com>
Date: Fri, 6 Feb 2026 20:10:05 -0800
From: Sean Christopherson <seanjc@...gle.com>
To: Paolo Bonzini <pbonzini@...hat.com>
Cc: kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
Sean Christopherson <seanjc@...gle.com>
Subject: [GIT PULL] KVM: guest_memfd changes for 6.20
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(-)
Powered by blists - more mailing lists