aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/svm.c
diff options
context:
space:
mode:
authorZachary Amsden <zamsden@redhat.com>2010-05-26 21:09:43 -0400
committerAvi Kivity <avi@redhat.com>2010-08-01 03:39:22 -0400
commit6dc696d4ddf2181eefee361e1d24a49351aef1f6 (patch)
tree03836aecacdb1fb054cffdf51534368521cd566d /arch/x86/kvm/svm.c
parent01c168ac3d6568fed0373d82bd2db2b9339aab16 (diff)
KVM: SVM: Fix EFER.LME being stripped
Must set VCPU register to be the guest notion of EFER even if that setting is not valid on hardware. This was masked by the set in set_efer until 7657fd5ace88e8092f5f3a84117e093d7b893f26 broke that. Fix is simply to set the VCPU register before stripping bits. Signed-off-by: Zachary Amsden <zamsden@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/svm.c')
-rw-r--r--arch/x86/kvm/svm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index 02ea5cf4b1e5..9c68a650f57e 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -286,11 +286,11 @@ static inline void flush_guest_tlb(struct kvm_vcpu *vcpu)
286 286
287static void svm_set_efer(struct kvm_vcpu *vcpu, u64 efer) 287static void svm_set_efer(struct kvm_vcpu *vcpu, u64 efer)
288{ 288{
289 vcpu->arch.efer = efer;
289 if (!npt_enabled && !(efer & EFER_LMA)) 290 if (!npt_enabled && !(efer & EFER_LMA))
290 efer &= ~EFER_LME; 291 efer &= ~EFER_LME;
291 292
292 to_svm(vcpu)->vmcb->save.efer = efer | EFER_SVME; 293 to_svm(vcpu)->vmcb->save.efer = efer | EFER_SVME;
293 vcpu->arch.efer = efer;
294} 294}
295 295
296static int is_external_interrupt(u32 info) 296static int is_external_interrupt(u32 info)