>From bfed574c93b36a19e2976ddcaae7939dd6c6fc41 Mon Sep 17 00:00:00 2001
From: Amit Shah <[EMAIL PROTECTED]>
Date: Sat, 3 Nov 2007 02:38:00 +0530
Subject: [PATCH] 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 should work
for most cases, but for some broken implementations that
set the LME bit before enabling PAE in CR4 to enter long
mode.

This is noticed on a solaris guest on an AMD host (but might
not be specific to AMD).

Signed-off-by: Amit Shah <[EMAIL PROTECTED]>
---
 drivers/kvm/x86.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/kvm/x86.h b/drivers/kvm/x86.h
index 663b822..5c10761 100644
--- a/drivers/kvm/x86.h
+++ b/drivers/kvm/x86.h
@@ -104,7 +104,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->shadow_efer & EFER_LME;
+       return vcpu->shadow_efer & EFER_LMA;
 #else
        return 0;
 #endif
-- 
1.4.4.2


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel

Reply via email to