From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: [PATCH] x86: emulate lea with two register operands correctly Date: Thu, 05 Jan 2012 19:03:09 +0000 Message-ID: References: <20120105160641.GB87519@ocelot.phlegethon.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20120105160641.GB87519@ocelot.phlegethon.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: Tim Deegan Cc: xen-devel@lists.xensource.com, David Vrabel List-Id: xen-devel@lists.xenproject.org On 05/01/2012 16:06, "Tim Deegan" wrote: > 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). Duh, good point. -- Keir > Tim.