[GIT PULL] KVM: guest_memfd and x86 CoCo changes for 7.3

Sean Christopherson <[email protected]>
Newsgroups org.kernel.vger.kvm,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
Fix the SNP VMSA PUNCH_HOLE bug, and prepare guest_memfd for in-place
conversion.  Regarding in-place conversion, my goal is to get it applied very
soon after 7.3-rc1, and then get you a pull request by -rc3 or -rc4.  I think
we're past the functional issues phase and fully into bikeshedding, so fingers
crossed.

The following changes since commit a204badd8432f93b7e862e7dac6db0fe3d65f370:

  Merge branch 'kvm-chainsaw' into HEAD (2026-06-25 11:32:09 +0200)

are available in the Git repository at:

  https://github.com/kvm-x86/linux.git tags/kvm-x86-coco-7.3

for you to fetch changes up to 2abcdf03fda1380bcbe00417b9ce2b4afb30899b:

  KVM: guest_memfd: Make private exactly what can be mapped on page fault (2026-07-27 09:43:44 -0700)

----------------------------------------------------------------
KVM guest_memfd and x86 CoCo changes for 7.3

 - Forcefully invalidate SNP VMSA pages if their backing guest_memfd page is
   zapped/invalidated, e.g. due to a PUNCH_HOLE in response to a Page-State
   Change request.

 - Rework the so called "prepare" and "invalidate" guest_memfd hooks to prepare
   for in-place private<=>shared conversion, and clean up a few warts along the
   way.

----------------------------------------------------------------
Ackerley Tng (1):
      KVM: guest_memfd: Only "prepare" folios for private pages

Sean Christopherson (20):
      KVM: SEV: Track the GPA of the guest-controlled VMSA used for SNP guests
      KVM: SEV: Extract loading of guest-provided VMSA to a separate helper
      KVM: SEV: Mark vCPU RUNNABLE after AP_CREATE, even if VMSA is unusable
      KVM: SEV: Wire up kvm_x86_ops.gmem_xxx() if and only if CONFIG_KVM_AMD_SEV=y
      KVM: x86: Serialize writes to disabled_quirks using kvm->lock
      KVM: x86: Ensure runtime reads of disabled_quirks are resolved once
      KVM: x86/mmu: Fold kvm_mmu_zap_memslot() into kvm_arch_flush_shadow_memslot()
      KVM: x86/mmu: Split kvm_mmu_zap_all_fast() into "front" and "back" halves
      KVM: x86/mmu: Use split "zap all fast" helpers when invalidating memslot
      KVM: SEV: Forcefully invalidate SNP VMSA if its backing gmem page is zapped
      KVM: SEV: Mark vCPU has having guest-provided VMSA even if its invalid
      KVM: x86: Guard .gmem_prepare() declarations with HAVE_KVM_GMEM_PREPARE=y
      KVM: guest_memfd: Pass the number of pages instead of the end pfn into .invalidate()
      KVM: guest_memfd: Rename invalidate() arch hook to reclaim() and isolate it
      KVM: x86: Rename kvm_x86_ops' gmem_invalidate() to gmem_make_shared()
      KVM: guest_memfd: Drop the redundant printk on arch gmem_prepare() failure
      KVM: guest_memfd: Add helpers to query SHARED vs. PRIVATE for a given page
      KVM: guest_memfd: Rename prepare() hook and Kconfig to make_private() / CONVERT
      KVM: guest_memfd: Explicitly pass number of pages to make_private() hook
      KVM: guest_memfd: Make private exactly what can be mapped on page fault

 arch/x86/include/asm/kvm-x86-ops.h |  12 ++-
 arch/x86/include/asm/kvm_host.h    |  15 ++-
 arch/x86/kvm/Kconfig               |   3 +-
 arch/x86/kvm/mmu/mmu.c             |  74 ++++++++------
 arch/x86/kvm/svm/sev.c             | 197 +++++++++++++++++++++++++------------
 arch/x86/kvm/svm/svm.c             |  10 +-
 arch/x86/kvm/svm/svm.h             |  19 ++--
 arch/x86/kvm/x86.c                 |  25 +++--
 arch/x86/kvm/x86.h                 |   2 +-
 include/linux/kvm_host.h           |  11 ++-
 virt/kvm/Kconfig                   |   6 +-
 virt/kvm/guest_memfd.c             |  72 ++++----------
 12 files changed, 269 insertions(+), 177 deletions(-)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.