public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] KVM: x86: Dynamically allocate hashed page list
@ 2025-04-01 15:57 Sean Christopherson
  2025-04-01 15:57 ` [PATCH v2 1/3] KVM: x86/mmu: Dynamically allocate shadow MMU's " Sean Christopherson
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Sean Christopherson @ 2025-04-01 15:57 UTC (permalink / raw)
  To: Sean Christopherson, Paolo Bonzini; +Cc: kvm, linux-kernel, Vipin Sharma

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.

v2:
 - Actually defer allocation when using TDP MMU. [Vipin]
 - Free allocation on MMU teardown. [Vipin]

v1: https://lore.kernel.org/all/20250315024010.2360884-1-seanjc@google.com

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          | 53 +++++++++++++++++++++++++++++----
 arch/x86/kvm/svm/svm.c          |  1 +
 arch/x86/kvm/vmx/vmx.c          |  1 +
 arch/x86/kvm/x86.c              |  5 +++-
 5 files changed, 56 insertions(+), 10 deletions(-)


base-commit: 782f9feaa9517caf33186dcdd6b50a8f770ed29b
-- 
2.49.0.472.ge94155a9ec-goog


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2025-04-25 17:45 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-01 15:57 [PATCH v2 0/3] KVM: x86: Dynamically allocate hashed page list Sean Christopherson
2025-04-01 15:57 ` [PATCH v2 1/3] KVM: x86/mmu: Dynamically allocate shadow MMU's " Sean Christopherson
2025-04-16 15:53   ` Vipin Sharma
2025-04-01 15:57 ` [PATCH v2 2/3] KVM: x86: Allocate kvm_vmx/kvm_svm structures using kzalloc() Sean Christopherson
2025-04-16 18:24   ` Vipin Sharma
2025-04-16 19:06     ` Vipin Sharma
2025-04-16 19:57       ` Sean Christopherson
2025-04-22 22:53         ` Huang, Kai
2025-04-23 17:07           ` Sean Christopherson
2025-04-23 21:46             ` Huang, Kai
2025-04-24 18:31               ` Sean Christopherson
2025-04-01 15:57 ` [PATCH v2 3/3] KVM: x86/mmu: Defer allocation of shadow MMU's hashed page list Sean Christopherson
2025-04-15 20:06   ` Vipin Sharma
2025-04-15 21:52     ` Sean Christopherson
2025-04-22  0:24       ` Sean Christopherson
2025-04-25 17:45         ` Sean Christopherson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox