diff options
author | Sean Christopherson <seanjc@google.com> | 2025-05-22 17:11:36 -0700 |
---|---|---|
committer | Sean Christopherson <seanjc@google.com> | 2025-06-24 12:50:34 -0700 |
commit | 039ef33e2f9346258fe2bd344f212c645942575e (patch) | |
tree | c0cd4e978b9153e703301938dbbe064d69297126 /scripts/lib/kdoc/kdoc_parser.py | |
parent | 1f287a4e7b90595718167f93f850f0a08484ec81 (diff) |
KVM: x86/mmu: Dynamically allocate shadow MMU's hashed page list
Dynamically allocate the (massive) array of hashed lists used to track
shadow pages, as the array itself is 32KiB, i.e. is an order-3 allocation
all on its own, and is *exactly* an order-3 allocation. Dynamically
allocating the array will allow allocating "struct kvm" using kvmalloc(),
and will also allow deferring allocation of the array until it's actually
needed, i.e. until the first shadow root is allocated.
Opportunistically use kvmalloc() for the hashed lists, as an order-3
allocation is (stating the obvious) less likely to fail than an order-4
allocation, and the overhead of vmalloc() is undesirable given that the
size of the allocation is fixed.
Cc: Vipin Sharma <vipinsh@google.com>
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Link: https://lore.kernel.org/r/20250523001138.3182794-3-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_parser.py')
0 files changed, 0 insertions, 0 deletions