From: Jan Beulich Date: Thu, 19 May 2016 10:06:33 +0000 (+0200) Subject: x86emul: suppress writeback upon unsuccessful MMX/SSE/AVX insn emulation X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~1105 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=2bb230972c5ddb1ca823f47750b5d46a9d302d0e;p=xen.git x86emul: suppress writeback upon unsuccessful MMX/SSE/AVX insn emulation This in particular prevents updating guest IP when handling the retry needed to forward the memory access to qemu. Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper Release-acked-by: Wei Liu --- diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c b/xen/arch/x86/x86_emulate/x86_emulate.c index 621332bcbd..d7c6d90cd6 100644 --- a/xen/arch/x86/x86_emulate/x86_emulate.c +++ b/xen/arch/x86/x86_emulate/x86_emulate.c @@ -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; }