Skip to content

Commit f530b53

Browse files
minipli-osssean-jc
authored andcommitted
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>
1 parent 14aa40a commit f530b53

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

include/linux/kvm_types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,11 @@ struct gfn_to_pfn_cache {
9191
* is topped up (__kvm_mmu_topup_memory_cache()).
9292
*/
9393
struct kvm_mmu_memory_cache {
94-
int nobjs;
9594
gfp_t gfp_zero;
9695
gfp_t gfp_custom;
9796
struct kmem_cache *kmem_cache;
9897
int capacity;
98+
int nobjs;
9999
void **objects;
100100
};
101101
#endif

0 commit comments

Comments
 (0)