From: Avi Kivity <[email protected]> Some processors don't have EFER; don't oops if userspace wants us to read EFER when we check NX.
Cc: [email protected] Signed-off-by: Avi Kivity <[email protected]> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 8b0d777..2d7082c 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -1128,9 +1128,9 @@ void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu) static int is_efer_nx(void) { - u64 efer; + unsigned long long efer = 0; - rdmsrl(MSR_EFER, efer); + rdmsrl_safe(MSR_EFER, &efer); return efer & EFER_NX; } -- To unsubscribe from this list: send the line "unsubscribe kvm-commits" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
