aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kvm/vmx.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 86f5bf121838..61c2a3a8d20a 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -1605,9 +1605,6 @@ static int vmx_vcpu_setup(struct vcpu_vmx *vmx)
1605 vmcs_writel(CR0_GUEST_HOST_MASK, ~0UL); 1605 vmcs_writel(CR0_GUEST_HOST_MASK, ~0UL);
1606 vmcs_writel(CR4_GUEST_HOST_MASK, KVM_GUEST_CR4_MASK); 1606 vmcs_writel(CR4_GUEST_HOST_MASK, KVM_GUEST_CR4_MASK);
1607 1607
1608 if (vm_need_virtualize_apic_accesses(vmx->vcpu.kvm))
1609 if (alloc_apic_access_page(vmx->vcpu.kvm) != 0)
1610 return -ENOMEM;
1611 1608
1612 return 0; 1609 return 0;
1613} 1610}
@@ -2537,6 +2534,9 @@ static struct kvm_vcpu *vmx_create_vcpu(struct kvm *kvm, unsigned int id)
2537 put_cpu(); 2534 put_cpu();
2538 if (err) 2535 if (err)
2539 goto free_vmcs; 2536 goto free_vmcs;
2537 if (vm_need_virtualize_apic_accesses(kvm))
2538 if (alloc_apic_access_page(kvm) != 0)
2539 goto free_vmcs;
2540 2540
2541 return &vmx->vcpu; 2541 return &vmx->vcpu;
2542 2542