summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorAmit Shah <amit.shah@qumranet.com>2009-04-17 19:40:13 -0300
committerChris Wright <chrisw@sous-sol.org>2009-04-27 10:37:04 -0700
commite8c4851a2ad9c7ada702141e621f127cb203c41e (patch)
treefa93917d3cd2f290308c101ea0bad632db275f9c /arch
parent7c3dbe6360ed32c9433524b7744d58ece1b605ad (diff)
KVM: is_long_mode() should check for EFER.LMA
upstream commit: 41d6af119206e98764b4ae6d264d63acefcf851e is_long_mode currently checks the LongModeEnable bit in EFER instead of the LongModeActive bit. This is wrong, but we survived this till now since it wasn't triggered. This breaks guests that go from long mode to compatibility mode. This is noticed on a solaris guest and fixes bug #1842160 Signed-off-by: Amit Shah <amit.shah@qumranet.com> Signed-off-by: Avi Kivity <avi@qumranet.com> Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kvm/mmu.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/mmu.h b/arch/x86/kvm/mmu.h
index 258e5d56298e..eaab2145f62b 100644
--- a/arch/x86/kvm/mmu.h
+++ b/arch/x86/kvm/mmu.h
@@ -54,7 +54,7 @@ static inline int kvm_mmu_reload(struct kvm_vcpu *vcpu)
static inline int is_long_mode(struct kvm_vcpu *vcpu)
{
#ifdef CONFIG_X86_64
- return vcpu->arch.shadow_efer & EFER_LME;
+ return vcpu->arch.shadow_efer & EFER_LMA;
#else
return 0;
#endif