Re: [PATCH 3/5] KVM: VMX: add struct kvm_vmx to hold VMX specific KVM vars

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux