aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2014-03-26 10:54:00 -0400
committerPaolo Bonzini <pbonzini@redhat.com>2014-03-27 08:06:51 -0400
commit920c837785699bcc48f4a729ba9ee3492f620b95 (patch)
tree51d7603c319a7c094534bc2ca5c80ffe178eee2d /arch
parentf7b9ddb8a5e8a25954217fa25d114bd8cf4491a4 (diff)
KVM: vmx: fix MPX detection
kvm_x86_ops is still NULL at this point. Since kvm_init_msr_list cannot fail, it is safe to initialize it before the call. Fixes: 93c4adc7afedf9b0ec190066d45b6d67db5270da Reported-by: Fengguang Wu <fengguang.wu@intel.com> Tested-by: Jet Chen <jet.chen@intel.com> Cc: kvm@vger.kernel.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kvm/x86.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index aa986959f237..d1c55f8722c6 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -5594,9 +5594,10 @@ int kvm_arch_init(void *opaque)
5594 goto out_free_percpu; 5594 goto out_free_percpu;
5595 5595
5596 kvm_set_mmio_spte_mask(); 5596 kvm_set_mmio_spte_mask();
5597 kvm_init_msr_list();
5598 5597
5599 kvm_x86_ops = ops; 5598 kvm_x86_ops = ops;
5599 kvm_init_msr_list();
5600
5600 kvm_mmu_set_mask_ptes(PT_USER_MASK, PT_ACCESSED_MASK, 5601 kvm_mmu_set_mask_ptes(PT_USER_MASK, PT_ACCESSED_MASK,
5601 PT_DIRTY_MASK, PT64_NX_MASK, 0); 5602 PT_DIRTY_MASK, PT64_NX_MASK, 0);
5602 5603