[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250927060910.2933942-4-seanjc@google.com>
Date: Fri, 26 Sep 2025 23:09:03 -0700
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: x86: MMU changes for 6.18
Recover TDP MMU NX huge pages under read lock, and fix two (interruptible)
deadlocks in prefaulting and in the TDX anti-zero-step code (there's a
selftest from Yan for the prefaulting case that I'll send along later).
The following changes since commit c17b750b3ad9f45f2b6f7e6f7f4679844244f0b9:
Linux 6.17-rc2 (2025-08-17 15:22:10 -0700)
are available in the Git repository at:
https://github.com/kvm-x86/linux.git tags/kvm-x86-mmu-6.18
for you to fetch changes up to 2bc2694fe20bf06eb73524426e3f4581d7b28923:
KVM: TDX: Do not retry locally when the retry is caused by invalid memslot (2025-09-10 12:06:35 -0700)
----------------------------------------------------------------
KVM x86 MMU changes for 6.18
- Recover possible NX huge pages within the TDP MMU under read lock to
reduce guest jitter when restoring NX huge pages.
- Return -EAGAIN during prefault if userspace concurrently deletes/moves the
relevant memslot to fix an issue where prefaulting could deadlock with the
memslot update.
- Don't retry in TDX's anti-zero-step mitigation if the target memslot is
invalid, i.e. is being deleted or moved, to fix a deadlock scenario similar
to the aforementioned prefaulting case.
----------------------------------------------------------------
Sean Christopherson (2):
KVM: x86/mmu: Return -EAGAIN if userspace deletes/moves memslot during prefault
KVM: TDX: Do not retry locally when the retry is caused by invalid memslot
Vipin Sharma (3):
KVM: x86/mmu: Track possible NX huge pages separately for TDP vs. Shadow MMU
KVM: x86/mmu: Rename kvm_tdp_mmu_zap_sp() to better indicate its purpose
KVM: x86/mmu: Recover TDP MMU NX huge pages using MMU read lock
arch/x86/include/asm/kvm_host.h | 39 ++++++----
arch/x86/kvm/mmu/mmu.c | 165 ++++++++++++++++++++++++++--------------
arch/x86/kvm/mmu/mmu_internal.h | 6 +-
arch/x86/kvm/mmu/tdp_mmu.c | 49 +++++++++---
arch/x86/kvm/mmu/tdp_mmu.h | 3 +-
arch/x86/kvm/vmx/tdx.c | 11 +++
virt/kvm/kvm_main.c | 1 +
7 files changed, 192 insertions(+), 82 deletions(-)
Powered by blists - more mailing lists