From: Keir Fraser Subject: Re: Invalid op code emulation for HVM guest and GPF Date: Fri, 23 Mar 2012 20:40:22 +0000 Message-ID: References: <4F6CD5DB.6090806@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4F6CD5DB.6090806@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper , Mukesh Rathor Cc: "Xen-devel@lists.xensource.com" , "kris.van.hees@oracle.com" List-Id: xen-devel@lists.xenproject.org On 23/03/2012 19:58, "Andrew Cooper" wrote: > On 23/03/12 19:38, Andrew Cooper wrote: >> Sadly, given your other email, I doubt it will work, because of the big >> catch all regarding the lock prefix. >> >> A brief scan over the Intel manuals and I cant see a case where an >> incorrect LOCK prefix would cause #GPF rather than #UD. >> >> Perhaps try changing it to EXP_UD instead of EXP_GP. (Although I make >> no guarantee that this wont cause a lot of things to break.) > > Try this patch instead. > > I have still yet to find a single example in either manual 2A or B where > an invalid lock prefix would cause a #GPF rather than #UD Yeah, this is a good fix. The origin of #GP is way back when I was doing a major weekend hack on extending the emulator for vmx realmode emulation. I expect in haste I picked the wrong exception type and that has propagated onward. I will apply to xen-unstable, and if it seems okay theer it can be backported for 4.1 and 4.0. -- Keir