* [PATCH] KVM: Fix lockup on 32-bit intel hosts with nx disabled in the bios
@ 2007-01-31 15:00 Avi Kivity
[not found] ` <20070131150017.020B9A0014-LjA0eNSCdXrQnzwC+xcbyw@public.gmane.org>
0 siblings, 1 reply; 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[parent not found: <20070131150017.020B9A0014-LjA0eNSCdXrQnzwC+xcbyw@public.gmane.org>]
* Re: [PATCH] KVM: Fix lockup on 32-bit intel hosts with nx disabled in the bios [not found] ` <20070131150017.020B9A0014-LjA0eNSCdXrQnzwC+xcbyw@public.gmane.org> @ 2007-01-31 15:02 ` Avi Kivity 2007-02-01 2:52 ` Jeff Chua 2007-02-01 7:55 ` Ingo Molnar 2 siblings, 0 replies; 4+ messages in thread From: Avi Kivity @ 2007-01-31 15:02 UTC (permalink / raw) To: akpm-3NddpPZAyC0 Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, linux-kernel-u79uwXL29TY76Z2rM5mHXA Avi Kivity wrote: > 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). > > Andrew, I believe this is 2.6.20 material. > Signed-off-by: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org> > > 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; > -- error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] KVM: Fix lockup on 32-bit intel hosts with nx disabled in the bios [not found] ` <20070131150017.020B9A0014-LjA0eNSCdXrQnzwC+xcbyw@public.gmane.org> 2007-01-31 15:02 ` Avi Kivity @ 2007-02-01 2:52 ` Jeff Chua 2007-02-01 7:55 ` Ingo Molnar 2 siblings, 0 replies; 4+ messages in thread From: Jeff Chua @ 2007-02-01 2:52 UTC (permalink / raw) To: Avi Kivity Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, akpm-3NddpPZAyC0, linux-kernel-u79uwXL29TY76Z2rM5mHXA On 1/31/07, Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org> wrote: > 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). Avi, thank you for the patch. I can confirm that this patch works on my IBM X60s notebook. Without it, the whole PC locks up upon starting qemu. Thanks, Jeff. ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] KVM: Fix lockup on 32-bit intel hosts with nx disabled in the bios [not found] ` <20070131150017.020B9A0014-LjA0eNSCdXrQnzwC+xcbyw@public.gmane.org> 2007-01-31 15:02 ` Avi Kivity 2007-02-01 2:52 ` Jeff Chua @ 2007-02-01 7:55 ` Ingo Molnar 2 siblings, 0 replies; 4+ messages in thread From: Ingo Molnar @ 2007-02-01 7:55 UTC (permalink / raw) To: Avi Kivity Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, akpm-3NddpPZAyC0, linux-kernel-u79uwXL29TY76Z2rM5mHXA * Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org> wrote: > 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-atKUWr5tajBWk0Htik3J/w@public.gmane.org> i think this is for v2.6.20. I have tested this ontop of -rc7. Acked-by: Ingo Molnar <mingo-X9Un+BFzKDI@public.gmane.org> Ingo ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-02-01 7:55 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
[not found] ` <20070131150017.020B9A0014-LjA0eNSCdXrQnzwC+xcbyw@public.gmane.org>
2007-01-31 15:02 ` Avi Kivity
2007-02-01 2:52 ` 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