From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] Handle #SS(0), caused by address size override in vm86 mode Date: Thu, 17 May 2007 15:51:33 +0300 Message-ID: <464C4FD5.4010605@qumranet.com> References: <20070515032704.GH31709@ifa.hawaii.edu> <4649671D.5000705@qumranet.com> <1179364298.21228.6.camel@lnitindesktop.sc.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel To: "Kamble, Nitin A" Return-path: In-Reply-To: <1179364298.21228.6.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@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 Kamble, Nitin A wrote: > Hi Avi, > > I was playing with KVM while booting SuSE Linux 10.1 on it. And I > found it was bailing out with #SS fault. I root caused it to the > address size override opcode (0x67) from a mov instruction from the > boot loader. > The attached patch handles the #SS(0) fault with emulation, letting > guest can proceed further. Applied, thanks. Please use Linux style comment next time ( /* * blah blah */ ) > commit e7ae040a34ae99ac4eb08701b1a54a7e4315238a > Author: Nitin A Kamble > Date: Wed May 16 21:05:58 2007 -0700 > > Instruction with address size override prefix opcode 0x67 > Cause the #SS fault with 0 error code in VM86 mode. > > > diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c > index b1430e1..7d7edb7 100644 > --- a/drivers/kvm/vmx.c > +++ b/drivers/kvm/vmx.c > @@ -1487,7 +1487,9 @@ static int handle_rmode_exception(struct kvm_vcpu *vcpu, > if (!vcpu->rmode.active) > return 0; > > - if (vec == GP_VECTOR && err_code == 0) > + /* Instruction with address size override prefix opcode 0x67 > + Cause the #SS fault with 0 error code in VM86 mode. */ > + if (((vec == GP_VECTOR) || (vec == SS_VECTOR)) && err_code == 0) > if (emulate_instruction(vcpu, NULL, 0, 0) == EMULATE_DONE) > return 1; > return 0; > -- error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/