[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250725220713.264711-8-seanjc@google.com>
Date: Fri, 25 Jul 2025 15:07:07 -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.17
Dynamically allocate the shadow MMU's hashed page list, as it's a whopping
32KiB and isn't needed when using the TDP MMU without nested VMs. The TDX
change is quite out of place, but it's in here as "KVM: x86: Use kvzalloc()
to allocate VM struct" depends on both the TDX change and on dynamically
allocating the hashed list (KVM uses kvzalloc() purely because the 32KiB
for the list blows up the size of struct kvm).
The following changes since commit 28224ef02b56fceee2c161fe2a49a0bb197e44f5:
KVM: TDX: Report supported optional TDVMCALLs in TDX capabilities (2025-06-20 14:20:20 -0400)
are available in the Git repository at:
https://github.com/kvm-x86/linux.git tags/kvm-x86-mmu-6.17
for you to fetch changes up to 9c4fe6d1509b386ab78f27dfaa2d128be77dc2d2:
KVM: x86/mmu: Defer allocation of shadow MMU's hashed page list (2025-06-24 12:51:07 -0700)
----------------------------------------------------------------
KVM x86 MMU changes for 6.17
- Exempt nested EPT from the the !USER + CR0.WP logic, as EPT doesn't interact
with CR0.WP.
- Move the TDX hardware setup code to tdx.c to better co-locate TDX code
and eliminate a few global symbols.
- Dynamically allocation the shadow MMU's hashed page list, and defer
allocating the hashed list until it's actually needed (the TDP MMU doesn't
use the list).
----------------------------------------------------------------
Sean Christopherson (5):
KVM: x86/mmu: Exempt nested EPT page tables from !USER, CR0.WP=0 logic
KVM: TDX: Move TDX hardware setup from main.c to tdx.c
KVM: x86/mmu: Dynamically allocate shadow MMU's hashed page list
KVM: x86: Use kvzalloc() to allocate VM struct
KVM: x86/mmu: Defer allocation of shadow MMU's hashed page list
arch/x86/include/asm/kvm_host.h | 6 ++--
arch/x86/kvm/mmu/mmu.c | 75 +++++++++++++++++++++++++++++++++++++----
arch/x86/kvm/mmu/paging_tmpl.h | 8 +++--
arch/x86/kvm/svm/svm.c | 2 ++
arch/x86/kvm/vmx/main.c | 36 ++------------------
arch/x86/kvm/vmx/tdx.c | 47 +++++++++++++++++++-------
arch/x86/kvm/vmx/tdx.h | 1 +
arch/x86/kvm/vmx/vmx.c | 2 ++
arch/x86/kvm/vmx/x86_ops.h | 10 ------
arch/x86/kvm/x86.c | 5 ++-
arch/x86/kvm/x86.h | 22 ++++++++++++
11 files changed, 145 insertions(+), 69 deletions(-)
Powered by blists - more mailing lists