[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250401155714.838398-1-seanjc@google.com>
Date: Tue, 1 Apr 2025 08:57:11 -0700
From: Sean Christopherson <seanjc@...gle.com>
To: Sean Christopherson <seanjc@...gle.com>, Paolo Bonzini <pbonzini@...hat.com>
Cc: kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
Vipin Sharma <vipinsh@...gle.com>
Subject: [PATCH v2 0/3] KVM: x86: Dynamically allocate hashed page list
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
Powered by blists - more mailing lists