kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] KVM: x86: Check LMA bit before set_efer
@ 2010-05-11  5:30 Sheng Yang
  2010-05-11  5:30 ` [PATCH 2/4] KVM: Clean up duplicate assignment Sheng Yang
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Sheng Yang @ 2010-05-11  5:30 UTC (permalink / raw)
  To: Avi Kivity, Marcelo Tosatti; +Cc: kvm, Sheng Yang

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>
---
 arch/x86/kvm/x86.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index cd8a606..2cae460 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -715,11 +715,11 @@ static int set_efer(struct kvm_vcpu *vcpu, u64 efer)
 			return 1;
 	}
 
-	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;
-- 
1.7.0.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2010-05-12  8:11 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-11  5:30 [PATCH 1/4] KVM: x86: Check LMA bit before set_efer Sheng Yang
2010-05-11  5:30 ` [PATCH 2/4] KVM: Clean up duplicate assignment Sheng Yang
2010-05-11  5:30 ` [PATCH 3/4] KVM: x86: Remove kvm_mmu_reset_context() in kvm_set_efer() Sheng Yang
2010-05-11 19:33   ` Marcelo Tosatti
2010-05-11  5:30 ` [PATCH 4/4] VMX: x86: Only reset MMU when necessary Sheng Yang
2010-05-11 19:36   ` Marcelo Tosatti
2010-05-12  1:53     ` Sheng Yang
2010-05-12  2:09       ` Sheng Yang
2010-05-12  6:31         ` Avi Kivity
2010-05-12  6:33           ` [PATCH 1/4] KVM: x86: Check LMA bit before set_efer Sheng Yang
2010-05-12  6:33           ` [PATCH 2/4] KVM: Clean up duplicate assignment Sheng Yang
2010-05-12  6:33           ` [PATCH 3/4] KVM: x86: Remove kvm_mmu_reset_context() in kvm_set_efer() Sheng Yang
2010-05-12  6:33           ` [PATCH 4/4] VMX: x86: Only reset MMU when necessary Sheng Yang
2010-05-12  6:59             ` Avi Kivity
2010-05-12  7:31               ` Sheng Yang
2010-05-12  8:11                 ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).