From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: Unhandled vm exit with old protected mode test Date: Mon, 19 Nov 2007 15:39:43 +0200 Message-ID: <4741921F.1060408@qumranet.com> References: <473D61D7.5050303@siemens.com> <4740146D.5040203@qumranet.com> <474155A9.6030804@siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Jan Kiszka Return-path: In-Reply-To: <474155A9.6030804-kv7WeFo6aLtBDgjK7y7TUQ@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 Jan Kiszka wrote: > Avi Kivity wrote: > >> Jan Kiszka wrote: >> >>> Hi, >>> >>> running some oldish 286 protected mode demo in kvm, I came across this >>> bug of kvm-52: >>> >>> unhandled vm exit: 0x80000021 vcpu_id 0 >>> ds 0000 (00100000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0) >>> >>> >>> >> ds.base must equal ds.sel<<4 when entering real-mode on Intel. See >> fix_rmode_seg() in vmx.c which clearly doesn't handle cases where >> ds.base >= 0x100000. You might try forcing bits 20+ of ds.base to zero >> in there. This may fix the problem or move it elsewhere. >> >> > > Yeah, this actually fixed my test case: > > Ensure that segment.base == segment.selector << 4 when entering the real > mode on Intel so that the CPU will not bark at us. > > Applied (after de-optimizing), thanks. -- error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/