From: Keir Fraser Subject: Re: [RFC][PATCH] Emulate instructions in vm86 mode Date: Fri, 08 Sep 2006 22:11:11 +0100 Message-ID: References: <20060908205844.GA2496@wavehammer.waldi.eu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20060908205844.GA2496@wavehammer.waldi.eu.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Bastian Blank Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 8/9/06 21:58, "Bastian Blank" wrote: >> Hmm, the code write 0 for this values to the exception frame in VM86 >> mode, lets check if this is the problem. > > It seems that this is the problem. > > The following patch always bounces traps in vm86 mode to the guest > kernel and don't longer clears the segment register values in the > exception frame. > > Signed-off-by: Bastian Blank That is only on the 'failsafe' stackframe path. It is okay to write zero values there because we already wrote the real values lower down on the stack frame (at labels FLT7 to FLT10). In fact you probably shouldn't end up taking the 'failsafe' path anyway, so the code you remove wouldn't normally be executed at all unless something in the guest is buggy. -- Keir