mbox series

[0/3] KVM: x86: Dynamically allocate hashed page list

Message ID 20250315024010.2360884-1-seanjc@google.com (mailing list archive)
Headers show
Series KVM: x86: Dynamically allocate hashed page list | expand

Message

Sean Christopherson March 15, 2025, 2:40 a.m. UTC
Allocate the hashed list of shadow pages dynamically (separate from
struct kvm), and on-demand.  The hashed list is 32KiB, i.e. absolutely
belongs in a separate allocation, and is worth skipping if KVM isn't
shadowing guest PTEs for the VM.

Sean Christopherson (3):
  KVM: x86/mmu: Dynamically allocate shadow MMU's hashed page list
  KVM: x86: Allocate kvm_vmx/kvm_svm structures using kzalloc()
  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          | 48 +++++++++++++++++++++++++++++----
 arch/x86/kvm/svm/svm.c          |  1 +
 arch/x86/kvm/vmx/vmx.c          |  1 +
 arch/x86/kvm/x86.c              |  5 +++-
 5 files changed, 52 insertions(+), 9 deletions(-)


base-commit: 7d2154117a02832ab3643fe2da4cdc9d2090dcb2