]> xenbits.xensource.com Git - xen.git/commitdiff
x86emul: suppress writeback upon unsuccessful MMX/SSE/AVX insn emulation
authorJan Beulich <jbeulich@suse.com>
Fri, 27 May 2016 12:49:52 +0000 (14:49 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 27 May 2016 12:49:52 +0000 (14:49 +0200)
This in particular prevents updating guest IP when handling the retry
needed to forward the memory access to qemu.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
master commit: 2bb230972c5ddb1ca823f47750b5d46a9d302d0e
master date: 2016-05-19 12:06:33 +0200

xen/arch/x86/x86_emulate/x86_emulate.c

index 5eac889a22bd2842f4c2094a858508d71c2a1817..a73913d96f88776a35bcb749751ffcdb4d61694d 100644 (file)
@@ -4111,6 +4111,8 @@ x86_emulate(
         if ( !rc && (b & 1) && (ea.type == OP_MEM) )
             rc = ops->write(ea.mem.seg, ea.mem.off, mmvalp,
                             ea.bytes, ctxt);
+        if ( rc )
+            goto done;
         dst.type = OP_NONE;
         break;
     }
@@ -4358,6 +4360,8 @@ x86_emulate(
         if ( !rc && (b != 0x6f) && (ea.type == OP_MEM) )
             rc = ops->write(ea.mem.seg, ea.mem.off, mmvalp,
                             ea.bytes, ctxt);
+        if ( rc )
+            goto done;
         dst.type = OP_NONE;
         break;
     }