summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryan Cantrill <bryan@joyent.com>2011-08-06 18:54:37 -0700
committerBryan Cantrill <bryan@joyent.com>2011-08-06 18:54:37 -0700
commit10394e877ca9e87669d2d93293aee33eb5361b20 (patch)
tree346bcd5acef9865095440cc2a854c3478e1a0144
parenta72ed4a6406c2f906e2b2e50ce57c7e35858199c (diff)
downloadillumos-kvm-10394e877ca9e87669d2d93293aee33eb5361b20.tar.gz
HVM-567 KVM: x86: Check LMA bit before set_efer
-rw-r--r--kvm_x86.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kvm_x86.c b/kvm_x86.c
index a0dbacb..b83dbf0 100644
--- a/kvm_x86.c
+++ b/kvm_x86.c
@@ -612,11 +612,11 @@ set_efer(struct kvm_vcpu *vcpu, uint64_t efer)
}
}
- 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;