lkml.org 
[lkml]   [2010]   [Jul]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[190/200] KVM: x86: Check LMA bit before set_efer
2.6.34-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Sheng Yang <sheng@linux.intel.com>

kvm_x86_ops->set_efer() would execute vcpu->arch.efer = efer, so the
checking of LMA bit didn't work.

Signed-off-by: Sheng Yang <sheng@linux.intel.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

(Cherry-picked from commit a3d204e28579427609c3d15d2310127ebaa47d94)
---
arch/x86/kvm/x86.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -657,11 +657,11 @@ static void set_efer(struct kvm_vcpu *vc
}
}

- kvm_x86_ops->set_efer(vcpu, efer);
-
efer &= ~EFER_LMA;
efer |= vcpu->arch.efer & EFER_LMA;

+ kvm_x86_ops->set_efer(vcpu, efer);
+
vcpu->arch.efer = efer;

vcpu->arch.mmu.base_role.nxe = (efer & EFER_NX) && !tdp_enabled;



\
 
 \ /
  Last update: 2010-07-01 23:31    [W:1.047 / U:11.324 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site