From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933328AbXAaPCG (ORCPT ); Wed, 31 Jan 2007 10:02:06 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933330AbXAaPCG (ORCPT ); Wed, 31 Jan 2007 10:02:06 -0500 Received: from il.qumranet.com ([62.219.232.206]:42813 "EHLO il.qumranet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933328AbXAaPCF (ORCPT ); Wed, 31 Jan 2007 10:02:05 -0500 Message-ID: <45C0AF6B.4020406@qumranet.com> Date: Wed, 31 Jan 2007 17:02:03 +0200 From: Avi Kivity User-Agent: Thunderbird 1.5.0.9 (X11/20061219) MIME-Version: 1.0 To: akpm@osdl.org CC: kvm-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, mingo@elte.hu Subject: Re: [PATCH] KVM: Fix lockup on 32-bit intel hosts with nx disabled in the bios References: <20070131150017.020B9A0014@il.qumranet.com> In-Reply-To: <20070131150017.020B9A0014@il.qumranet.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org 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 > > 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] KVM: Fix lockup on 32-bit intel hosts with nx disabled in the bios Date: Wed, 31 Jan 2007 17:02:03 +0200 Message-ID: <45C0AF6B.4020406@qumranet.com> References: <20070131150017.020B9A0014@il.qumranet.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: akpm-3NddpPZAyC0@public.gmane.org Return-path: In-Reply-To: <20070131150017.020B9A0014-LjA0eNSCdXrQnzwC+xcbyw@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org 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 > > 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