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-changelog

[Xen-changelog] [xen-unstable] x86_emulate: INS/OUTS need Mov attribute

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86_emulate: INS/OUTS need Mov attribute to force writeback (since
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 03 Mar 2008 07:30:34 -0800
Delivery-date: Mon, 03 Mar 2008 07:32:09 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1204544860 0
# Node ID c89f6ed5635179695c92810a9c9eec205e5d0d78
# Parent  a142ddb40b1c77d6b8726a2b57ac324ab74c6d06
x86_emulate: INS/OUTS need Mov attribute to force writeback (since
dst.orig_val is not initialised). Also, Mov attribute on cmpxchg is
not necessary -- when destination is memory (i.e., successful cmpxchg)
then dst.orig_val is already correctly filled in. In case that
dst.orig_val == dst.val then the instruction linearises at the point
we first read the destination (and initialised dst.orig_val).
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/arch/x86/x86_emulate.c |    4 +---
 1 files changed, 1 insertion(+), 3 deletions(-)

diff -r a142ddb40b1c -r c89f6ed56351 xen/arch/x86/x86_emulate.c
--- a/xen/arch/x86/x86_emulate.c        Mon Mar 03 11:09:33 2008 +0000
+++ b/xen/arch/x86/x86_emulate.c        Mon Mar 03 11:47:40 2008 +0000
@@ -106,7 +106,7 @@ static uint8_t opcode_table[256] = {
     /* 0x68 - 0x6F */
     ImplicitOps|Mov, DstReg|SrcImm|ModRM|Mov,
     ImplicitOps|Mov, DstReg|SrcImmByte|ModRM|Mov,
-    ImplicitOps, ImplicitOps, ImplicitOps, ImplicitOps,
+    ImplicitOps|Mov, ImplicitOps|Mov, ImplicitOps|Mov, ImplicitOps|Mov,
     /* 0x70 - 0x77 */
     ImplicitOps, ImplicitOps, ImplicitOps, ImplicitOps,
     ImplicitOps, ImplicitOps, ImplicitOps, ImplicitOps,
@@ -2862,8 +2862,6 @@ x86_emulate(
         src.orig_val = src.val;
         src.val = _regs.eax;
         emulate_2op_SrcV("cmp", src, dst, _regs.eflags);
-        /* Always write back. The question is: where to? */
-        d |= Mov;
         if ( _regs.eflags & EFLG_ZF )
         {
             /* Success: write back to memory. */

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] x86_emulate: INS/OUTS need Mov attribute to force writeback (since, Xen patchbot-unstable <=