diff options
author | Mathias Krause <minipli@grsecurity.net> | 2023-02-17 20:33:36 +0100 |
---|---|---|
committer | Sean Christopherson <seanjc@google.com> | 2023-03-24 00:10:59 +0100 |
commit | f530b531fb9e05eb134cfc334242799ea974d111 (patch) | |
tree | 62c91a91b12e9ed73675789ca13b0b97aba9e5e4 /include | |
parent | kvm: kvm_main: Remove unnecessary (void*) conversions (diff) | |
download | linux-f530b531fb9e05eb134cfc334242799ea974d111.tar.xz linux-f530b531fb9e05eb134cfc334242799ea974d111.zip |
KVM: Shrink struct kvm_mmu_memory_cache
Move the 'capacity' member around to make use of the padding hole on 64
bit systems instead of introducing yet another one.
This allows us to save 8 bytes per instance for 64 bit builds of which,
e.g., x86's struct kvm_vcpu_arch has a few.
Signed-off-by: Mathias Krause <minipli@grsecurity.net>
Link: https://lore.kernel.org/r/20230217193336.15278-3-minipli@grsecurity.net
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/kvm_types.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/kvm_types.h b/include/linux/kvm_types.h index 2728d49bbdf6..6f4737d5046a 100644 --- a/include/linux/kvm_types.h +++ b/include/linux/kvm_types.h @@ -91,11 +91,11 @@ struct gfn_to_pfn_cache { * is topped up (__kvm_mmu_topup_memory_cache()). */ struct kvm_mmu_memory_cache { - int nobjs; gfp_t gfp_zero; gfp_t gfp_custom; struct kmem_cache *kmem_cache; int capacity; + int nobjs; void **objects; }; #endif |