* [PATCH] x86emul: suppress writeback upon unsuccessful MMX/SSE/AVX insn emulation
@ 2016-05-18 14:49 Jan Beulich
2016-05-18 15:04 ` Andrew Cooper
2016-05-18 15:07 ` Wei Liu
0 siblings, 2 replies; 3+ messages in thread
From: Jan Beulich @ 2016-05-18 14:49 UTC (permalink / raw)
To: xen-devel; +Cc: Andrew Cooper, Wei Liu, wogiz
[-- Attachment #1: Type: text/plain, Size: 871 bytes --]
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>
--- 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;
}
[-- Attachment #2: x86emul-SSE-error-handling.patch --]
[-- Type: text/plain, Size: 941 bytes --]
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 <jbeulich@suse.com>
--- 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;
}
[-- Attachment #3: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] x86emul: suppress writeback upon unsuccessful MMX/SSE/AVX insn emulation
2016-05-18 14:49 [PATCH] x86emul: suppress writeback upon unsuccessful MMX/SSE/AVX insn emulation Jan Beulich
@ 2016-05-18 15:04 ` Andrew Cooper
2016-05-18 15:07 ` Wei Liu
1 sibling, 0 replies; 3+ messages in thread
From: Andrew Cooper @ 2016-05-18 15:04 UTC (permalink / raw)
To: Jan Beulich, xen-devel; +Cc: wogiz, Wei Liu
On 18/05/16 15:49, Jan Beulich wrote:
> 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>
Oops.
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] x86emul: suppress writeback upon unsuccessful MMX/SSE/AVX insn emulation
2016-05-18 14:49 [PATCH] x86emul: suppress writeback upon unsuccessful MMX/SSE/AVX insn emulation Jan Beulich
2016-05-18 15:04 ` Andrew Cooper
@ 2016-05-18 15:07 ` Wei Liu
1 sibling, 0 replies; 3+ messages in thread
From: Wei Liu @ 2016-05-18 15:07 UTC (permalink / raw)
To: Jan Beulich; +Cc: xen-devel, Wei Liu, wogiz, Andrew Cooper
On Wed, May 18, 2016 at 08:49:01AM -0600, Jan Beulich wrote:
> 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>
Release-acked-by: Wei Liu <wei.liu2@citrix.com>
>
> --- 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;
> }
>
>
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-05-18 15:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-18 14:49 [PATCH] x86emul: suppress writeback upon unsuccessful MMX/SSE/AVX insn emulation Jan Beulich
2016-05-18 15:04 ` Andrew Cooper
2016-05-18 15:07 ` Wei Liu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.