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] [XEN] Fix emulator EA calculation for LOD

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [XEN] Fix emulator EA calculation for LODS/STOS.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 26 Nov 2006 17:50:13 +0000
Delivery-date: Sun, 26 Nov 2006 09:49:57 -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 kaf24@xxxxxxxxxxxxxxxxxxxxx
# Node ID 91951de7592c0a553dd5bacef6b481cab2e9fac5
# Parent  e4bb22422b50871e26120d39b5667c9091d49f62
[XEN] Fix emulator EA calculation for LODS/STOS.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 xen/arch/x86/x86_emulate.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff -r e4bb22422b50 -r 91951de7592c xen/arch/x86/x86_emulate.c
--- a/xen/arch/x86/x86_emulate.c        Sun Nov 26 13:52:48 2006 +0000
+++ b/xen/arch/x86/x86_emulate.c        Sun Nov 26 17:35:00 2006 +0000
@@ -1007,23 +1007,25 @@ x86_emulate_memop(
                 goto done;
             ea = register_address(*seg, _regs.esi);
         }
+        page_boundary_test();
         register_address_increment(
             _regs.esi, (_regs.eflags & EFLG_DF) ? -dst.bytes : dst.bytes);
         register_address_increment(
             _regs.edi, (_regs.eflags & EFLG_DF) ? -dst.bytes : dst.bytes);
+        break;
+    case 0xaa ... 0xab: /* stos */
+        ea = register_address(_regs.es, _regs.edi);
         page_boundary_test();
-        break;
-    case 0xaa ... 0xab: /* stos */
         dst.type  = OP_MEM;
         dst.bytes = (d & ByteOp) ? 1 : op_bytes;
         dst.ptr   = (unsigned long *)cr2;
         dst.val   = _regs.eax;
         register_address_increment(
             _regs.edi, (_regs.eflags & EFLG_DF) ? -dst.bytes : dst.bytes);
-        ea = register_address(_regs.es, _regs.edi);
+        break;
+    case 0xac ... 0xad: /* lods */
+        ea = register_address(*seg, _regs.esi);
         page_boundary_test();
-        break;
-    case 0xac ... 0xad: /* lods */
         dst.type  = OP_REG;
         dst.bytes = (d & ByteOp) ? 1 : op_bytes;
         dst.ptr   = (unsigned long *)&_regs.eax;
@@ -1031,8 +1033,6 @@ x86_emulate_memop(
             goto done;
         register_address_increment(
             _regs.esi, (_regs.eflags & EFLG_DF) ? -dst.bytes : dst.bytes);
-        ea = register_address(*seg, _regs.esi);
-        page_boundary_test();
         break;
     }
     goto writeback;

_______________________________________________
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] [XEN] Fix emulator EA calculation for LODS/STOS., Xen patchbot-unstable <=