linux/arch/arm64
David Matlack 837f66c712 KVM: Allow for different capacities in kvm_mmu_memory_cache structs
Allow the capacity of the kvm_mmu_memory_cache struct to be chosen at
declaration time rather than being fixed for all declarations. This will
be used in a follow-up commit to declare an cache in x86 with a capacity
of 512+ objects without having to increase the capacity of all caches in
KVM.

This change requires each cache now specify its capacity at runtime,
since the cache struct itself no longer has a fixed capacity known at
compile time. To protect against someone accidentally defining a
kvm_mmu_memory_cache struct directly (without the extra storage), this
commit includes a WARN_ON() in kvm_mmu_topup_memory_cache().

In order to support different capacities, this commit changes the
objects pointer array to be dynamically allocated the first time the
cache is topped-up.

While here, opportunistically clean up the stack-allocated
kvm_mmu_memory_cache structs in riscv and arm64 to use designated
initializers.

No functional change intended.

Reviewed-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: David Matlack <dmatlack@google.com>
Message-Id: <20220516232138.1783324-22-dmatlack@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-06-24 04:52:00 -04:00
..
boot USB / Thunderbolt changes for 5.19-rc1 2022-06-03 11:17:49 -07:00
configs - Enable essential PMIC and regulatro drivers for MT8195. 2022-05-13 14:02:30 +02:00
crypto crypto: arm64/sm4 - Fix wrong dependency of NEON/CE implementation 2022-04-15 16:34:30 +08:00
hyperv
include KVM: arm64: Drop stale comment 2022-06-09 13:24:02 +01:00
kernel KVM: arm64: Ignore 'kvm-arm.mode=protected' when using VHE 2022-06-09 13:24:02 +01:00
kvm KVM: Allow for different capacities in kvm_mmu_memory_cache structs 2022-06-24 04:52:00 -04:00
lib S390: 2022-05-26 14:20:14 -07:00
mm arm64/hugetlb: Fix building errors in huge_ptep_clear_flush() 2022-05-27 10:56:35 -07:00
net bpf, arm64: Sign return address for JITed code 2022-04-06 00:04:22 +02:00
tools S390: 2022-05-26 14:20:14 -07:00
xen
Kbuild
Kconfig RISC-V Patches for the 5.19 Merge Window, Part 1 2022-05-31 14:10:54 -07:00
Kconfig.debug
Kconfig.platforms arm64 updates for 5.19: 2022-05-23 21:06:11 -07:00
Makefile kbuild: factor out the common installation code into scripts/install.sh 2022-05-11 21:45:53 +09:00