aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/kvm/x86.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-05-18 09:12:45 +0200
committerIngo Molnar <mingo@elte.hu>2009-05-18 09:12:51 +0200
commitb286e21868ea1af724a7a4802da2c8e144fa70de (patch)
tree75a3e57a00cf70aab372b5583d2b7bf7f053cbea /arch/x86/kvm/x86.c
parented077b58f6146684069975122b1728a9d248a501 (diff)
parent1406de8e11eb043681297adf86d6892ff8efc27a (diff)
Merge commit 'v2.6.30-rc6' into x86/mm
Merge reason: sync up to -rc6 which has changes to mm/ which we are going to touch in the commits to follow as well. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r--arch/x86/kvm/x86.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 7c1ce5ac613..49079a46687 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -1121,9 +1121,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;
}
@@ -1259,7 +1259,7 @@ static void do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
bit(X86_FEATURE_CMOV) | bit(X86_FEATURE_PSE36) |
bit(X86_FEATURE_MMX) | bit(X86_FEATURE_FXSR) |
bit(X86_FEATURE_SYSCALL) |
- (bit(X86_FEATURE_NX) && is_efer_nx()) |
+ (is_efer_nx() ? bit(X86_FEATURE_NX) : 0) |
#ifdef CONFIG_X86_64
bit(X86_FEATURE_LM) |
#endif