Commit 94bca3f7 authored by Paolo Bonzini's avatar Paolo Bonzini Committed by Ben Hutchings

KVM: vmx: fix MPX detection

commit 920c8377 upstream.

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: 93c4adc7Reported-by: default avatarFengguang Wu <fengguang.wu@intel.com>
Tested-by: default avatarJet Chen <jet.chen@intel.com>
Cc: kvm@vger.kernel.org
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Cc: Brad Spengler <spender@grsecurity.net>
[bwh: Dependency of "KVM: x86: expose MSR_TSC_AUX to userspace",
 applied in 3.2.77]
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent 8ad5c667
......@@ -5257,9 +5257,10 @@ int kvm_arch_init(void *opaque)
goto out;
kvm_set_mmio_spte_mask();
kvm_init_msr_list();
kvm_x86_ops = ops;
kvm_init_msr_list();
kvm_mmu_set_mask_ptes(PT_USER_MASK, PT_ACCESSED_MASK,
PT_DIRTY_MASK, PT64_NX_MASK, 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment