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 Thu, Apr 12, 2018 at 10:59:51AM +0200, Paolo Bonzini wrote:
> 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.

Didn't Karim post some patches to use vmalloc? Could this work piggyhbsack on that?

> 
> Paolo
> 



[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