From: Tim Deegan Subject: Re: [PATCH] x86: emulate lea with two register operands correctly Date: Thu, 5 Jan 2012 16:06:41 +0000 Message-ID: <20120105160641.GB87519@ocelot.phlegethon.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: xen-devel@lists.xensource.com, David Vrabel List-Id: xen-devel@lists.xenproject.org At 15:49 +0000 on 05 Jan (1325778595), Keir Fraser wrote: > On 05/01/2012 15:03, "David Vrabel" wrote: > > > An lea instruction with two register operands should raise an > > undefined instruction exception. > > > > Skype does such a instruction and will crash when starting if it does > > not get the exception. > > Thanks. I think it is a little nicer to check ea.type != OP_MEM, so I made > that change before committing this patch. It's now in xen-unstable staging. > > It's a bit concerning that we're emulating LEA at all, perhaps. I wonder if > a pagetable page has been reused as a code page and we didn't notice yet? Or > is there some other reason that skype is getting emulated? :-) #UD exceptions in HVM are passed to the emulator (IIRC as part of the cross-vendor migration patches, so SYSENTER & friends could be managed). Tim.