Commit 432bd6cb authored by Avi Kivity's avatar Avi Kivity Committed by Linus Torvalds

[PATCH] KVM: fix lockup on 32-bit intel hosts with nx disabled in the bios

Intel hosts, without long mode, and with nx support disabled in the bios
have an efer that is readable but not writable.  This causes a lockup on
switch to guest mode (even though it should exit with reason 34 according
to the documentation).
Signed-off-by: default avatarAvi Kivity <avi@qumranet.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 6a4c24ec
...@@ -1116,6 +1116,8 @@ static int vmx_vcpu_setup(struct kvm_vcpu *vcpu) ...@@ -1116,6 +1116,8 @@ static int vmx_vcpu_setup(struct kvm_vcpu *vcpu)
if (rdmsr_safe(index, &data_low, &data_high) < 0) if (rdmsr_safe(index, &data_low, &data_high) < 0)
continue; continue;
if (wrmsr_safe(index, data_low, data_high) < 0)
continue;
data = data_low | ((u64)data_high << 32); data = data_low | ((u64)data_high << 32);
vcpu->host_msrs[j].index = index; vcpu->host_msrs[j].index = index;
vcpu->host_msrs[j].reserved = 0; vcpu->host_msrs[j].reserved = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment