On 12/04/2018 00:20, Jim Mattson wrote: > On Tue, Mar 20, 2018 at 12:17 PM, Sean Christopherson > <sean.j.christopherson@xxxxxxxxx> wrote: >> Add struct kvm_vmx, which wraps struct kvm, and a helper to_kvm_vmx() >> that retrieves 'struct kvm_vmx *' from 'struct kvm *'. Move the VMX >> specific variables out of kvm_arch and into kvm_vmx. > >> static struct kvm *vmx_vm_alloc(void) >> { >> - return kzalloc(sizeof(struct kvm), GFP_KERNEL); >> + struct kvm_vmx *kvm_vmx = kzalloc(sizeof(struct kvm_vmx), GFP_KERNEL); >> + return &kvm_vmx->kvm; >> } > > struct kvm_vmx is getting quite large: > (gdb) p sizeof(struct kvm_vmx) > $1 = 42216 > > We sometimes find that kmalloc cannot satisfy order 4 allocation > requests due to fragmentation. Is vmalloc an option? cpuid info could definitely be moved to a separate vmalloc-ed block, as a start. Paolo