public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM: Fix lockup on 32-bit intel hosts with nx disabled in the bios
@ 2007-01-31 15:00 Avi Kivity
  2007-01-31 15:02 ` Avi Kivity
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Avi Kivity @ 2007-01-31 15:00 UTC (permalink / raw)
  To: kvm-devel; +Cc: linux-kernel, akpm, mingo

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: Avi Kivity <avi@qumranet.com>

Index: linux-2.6/drivers/kvm/vmx.c
===================================================================
--- linux-2.6.orig/drivers/kvm/vmx.c
+++ linux-2.6/drivers/kvm/vmx.c
@@ -1128,6 +1128,8 @@ static int vmx_vcpu_setup(struct kvm_vcp
 
 		if (rdmsr_safe(index, &data_low, &data_high) < 0)
 			continue;
+		if (wrmsr_safe(index, data_low, data_high) < 0)
+			continue;
 		data = data_low | ((u64)data_high << 32);
 		vcpu->host_msrs[j].index = index;
 		vcpu->host_msrs[j].reserved = 0;

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

end of thread, other threads:[~2007-02-01  7:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-31 15:00 [PATCH] KVM: Fix lockup on 32-bit intel hosts with nx disabled in the bios Avi Kivity
2007-01-31 15:02 ` Avi Kivity
2007-02-01  2:52 ` [kvm-devel] " Jeff Chua
2007-02-01  7:55 ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox