WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] x86_emulate(): Upon LOCK prefix for MOV, should inject #

To: "Liu, Eric E" <eric.e.liu@xxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] x86_emulate(): Upon LOCK prefix for MOV, should inject #UD rather than #GP?
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Thu, 20 Dec 2007 09:42:16 +0000
Delivery-date: Thu, 20 Dec 2007 01:43:04 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <9D7649D18729DE4BB2BD7B494F7FEDC2C46877@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AchCtD/3n07kelioRSCaZ5nHelu8BQAOFsFl
Thread-topic: [Xen-devel] x86_emulate(): Upon LOCK prefix for MOV, should inject #UD rather than #GP?
User-agent: Microsoft-Entourage/11.3.6.070618
Strictly speaking we don't actually generate exceptions yet. We return
X86EMUL_UNHANDLEABLE to the caller, and they will often inject #UD as a
result. But yes, it really should be EXC_UD.

 -- Keir


On 20/12/07 02:58, "Liu, Eric E" <eric.e.liu@xxxxxxxxx> wrote:

> Hi all,
> The Intel SDM(2A) says that if the LOCK prefix is used with some
> instructions such as "mov" and the souce  operand is a memory operand, a
> #UD may be generated, but in the x86_emulate.c there are places such as
> :
>     942     /* Lock prefix is allowed only on RMW instructions.
> */
>     943     generate_exception_if((d & Mov) && lock_prefix,
> EXC_GP);
> here we inject EXC_GP but not EXC_UD, is it a bug?
> 
> --Eric (Liu, Feng)
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>