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-3.2-testing] x86_emulate: Handle rep_ins, rep_outs,

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.2-testing] x86_emulate: Handle rep_ins, rep_outs, rep_movs hook failure and fall
From: "Xen patchbot-3.2-testing" <patchbot-3.2-testing@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 21 Feb 2008 07:11:57 -0800
Delivery-date: Fri, 22 Feb 2008 07:34:42 -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 1203343524 0
# Node ID d590e594453015229747425753b4ef2ef0930b62
# Parent  e08d00f0c3e33a879123abeee19da95f1b5b2193
x86_emulate: Handle rep_ins, rep_outs, rep_movs hook failure and fall
back to slow path.
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
xen-unstable changeset:   16996:5e08872c24f791921be8bbea3419a8e85da22148
xen-unstable date:        Thu Feb 07 18:56:47 2008 +0000
---
 xen/arch/x86/x86_emulate.c |   33 ++++++++++++++++++---------------
 1 files changed, 18 insertions(+), 15 deletions(-)

diff -r e08d00f0c3e3 -r d590e5944530 xen/arch/x86/x86_emulate.c
--- a/xen/arch/x86/x86_emulate.c        Mon Feb 18 14:04:57 2008 +0000
+++ b/xen/arch/x86/x86_emulate.c        Mon Feb 18 14:05:24 2008 +0000
@@ -2225,11 +2225,12 @@ x86_emulate(
         dst.bytes = !(b & 1) ? 1 : (op_bytes == 8) ? 4 : op_bytes;
         dst.mem.seg = x86_seg_es;
         dst.mem.off = truncate_ea(_regs.edi);
-        if ( (nr_reps > 1) && (ops->rep_ins != NULL) )
-        {
-            if ( (rc = ops->rep_ins((uint16_t)_regs.edx, dst.mem.seg,
-                                    dst.mem.off, dst.bytes,
-                                    &nr_reps, ctxt)) != 0 )
+        if ( (nr_reps > 1) && (ops->rep_ins != NULL) &&
+             ((rc = ops->rep_ins((uint16_t)_regs.edx, dst.mem.seg,
+                                 dst.mem.off, dst.bytes,
+                                 &nr_reps, ctxt)) != X86EMUL_UNHANDLEABLE) )
+        {
+            if ( rc != 0 )
                 goto done;
         }
         else
@@ -2252,11 +2253,12 @@ x86_emulate(
         unsigned long nr_reps = get_rep_prefix();
         generate_exception_if(!mode_iopl(), EXC_GP);
         dst.bytes = !(b & 1) ? 1 : (op_bytes == 8) ? 4 : op_bytes;
-        if ( (nr_reps > 1) && (ops->rep_outs != NULL) )
-        {
-            if ( (rc = ops->rep_outs(ea.mem.seg, truncate_ea(_regs.esi),
-                                     (uint16_t)_regs.edx, dst.bytes,
-                                     &nr_reps, ctxt)) != 0 )
+        if ( (nr_reps > 1) && (ops->rep_outs != NULL) &&
+             ((rc = ops->rep_outs(ea.mem.seg, truncate_ea(_regs.esi),
+                                  (uint16_t)_regs.edx, dst.bytes,
+                                  &nr_reps, ctxt)) != X86EMUL_UNHANDLEABLE) )
+        {
+            if ( rc != 0 )
                 goto done;
         }
         else
@@ -2403,11 +2405,12 @@ x86_emulate(
         dst.bytes = (d & ByteOp) ? 1 : op_bytes;
         dst.mem.seg = x86_seg_es;
         dst.mem.off = truncate_ea(_regs.edi);
-        if ( (nr_reps > 1) && (ops->rep_movs != NULL) )
-        {
-            if ( (rc = ops->rep_movs(ea.mem.seg, truncate_ea(_regs.esi),
-                                     dst.mem.seg, dst.mem.off, dst.bytes,
-                                     &nr_reps, ctxt)) != 0 )
+        if ( (nr_reps > 1) && (ops->rep_movs != NULL) &&
+             ((rc = ops->rep_movs(ea.mem.seg, truncate_ea(_regs.esi),
+                                  dst.mem.seg, dst.mem.off, dst.bytes,
+                                  &nr_reps, ctxt)) != X86EMUL_UNHANDLEABLE) )
+        {
+            if ( rc != 0 )
                 goto done;
         }
         else

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-3.2-testing] x86_emulate: Handle rep_ins, rep_outs, rep_movs hook failure and fall, Xen patchbot-3.2-testing <=