1
0
Fork 0

KVM: is_long_mode() should check for EFER.LMA

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>
hifive-unleashed-5.1
Amit Shah 2008-02-28 16:06:15 +05:30 committed by Avi Kivity
parent 401d10dee0
commit 41d6af1192
1 changed files with 1 additions and 1 deletions

View File

@ -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