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: Handle rep_ins, rep_outs, r

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86_emulate: Handle rep_ins, rep_outs, rep_movs hook failure and fall
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 07 Feb 2008 15:50:08 -0800
Delivery-date: Thu, 07 Feb 2008 15:50:11 -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 1202410607 0
# Node ID 5e08872c24f791921be8bbea3419a8e85da22148
# Parent  445edf4089a3ccaca977665423e903b5300832cb
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/arch/x86/x86_emulate.c |   33 ++++++++++++++++++---------------
 1 files changed, 18 insertions(+), 15 deletions(-)

diff -r 445edf4089a3 -r 5e08872c24f7 xen/arch/x86/x86_emulate.c
--- a/xen/arch/x86/x86_emulate.c        Thu Feb 07 18:00:44 2008 +0000
+++ b/xen/arch/x86/x86_emulate.c        Thu Feb 07 18:56:47 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-unstable] x86_emulate: Handle rep_ins, rep_outs, rep_movs hook failure and fall, Xen patchbot-unstable <=