• Sean Christopherson's avatar
    KVM: VMX: Allocate VPID after initializing VCPU · 034d8e2c
    Sean Christopherson authored
    Do VPID allocation after calling the common kvm_vcpu_init() as a step
    towards doing vCPU allocation (via kmem_cache_zalloc()) and calling
    kvm_vcpu_init() back-to-back.  Squishing allocation and initialization
    together will eventually allow the sequence to be moved to arch-agnostic
    creation code.
    
    Note, the VPID is not consumed until KVM_RUN, slightly delaying its
    allocation should have no real function impact.  VPID allocation was
    arbitrarily placed in the original patch, commit 2384d2b3 ("KVM:
    VMX: Enable Virtual Processor Identification (VPID)").
    Signed-off-by: default avatarSean Christopherson <sean.j.christopherson@intel.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    034d8e2c
vmx.c 220 KB