]> xenbits.xensource.com Git - xen.git/commitdiff
x86emul: suppress writeback upon unsuccessful MMX/SSE/AVX insn emulation
authorJan Beulich <jbeulich@suse.com>
Thu, 19 May 2016 10:06:33 +0000 (12:06 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 19 May 2016 10:06:33 +0000 (12:06 +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>
Release-acked-by: Wei Liu <wei.liu2@citrix.com>
xen/arch/x86/x86_emulate/x86_emulate.c

index 621332bcbdc29e41c19f468fbad5f953fbd6ed15..d7c6d90cd6fd91f21ef6631d6995afad05e7a495 100644 (file)
@@ -4178,6 +4178,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;
     }
@@ -4430,6 +4432,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;
     }