xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86emul: suppress alignment check for {, v}mov{d, q}
@ 2016-11-10 12:29 Jan Beulich
  2016-11-11 15:36 ` Andrew Cooper
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Beulich @ 2016-11-10 12:29 UTC (permalink / raw)
  To: xen-devel; +Cc: Andrew Cooper, Wei Liu

[-- Attachment #1: Type: text/plain, Size: 598 bytes --]

When introducing support for these instructions, adjustment for the
alignment check logic (generating #GP(0)) was overlooked.

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
@@ -4940,7 +4940,7 @@ x86_emulate(
         {
             uint32_t mxcsr = 0;
 
-            if ( vex.pfx != vex_66 )
+            if ( ea.bytes < 16 || vex.pfx == vex_f3 )
                 mxcsr = MXCSR_MM;
             else if ( vcpu_has_misalignsse() )
                 asm ( "stmxcsr %0" : "=m" (mxcsr) );




[-- Attachment #2: x86emul-movq-no-align.patch --]
[-- Type: text/plain, Size: 646 bytes --]

x86emul: suppress alignment check for {,v}mov{d,q}

When introducing support for these instructions, adjustment for the
alignment check logic (generating #GP(0)) was overlooked.

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
@@ -4940,7 +4940,7 @@ x86_emulate(
         {
             uint32_t mxcsr = 0;
 
-            if ( vex.pfx != vex_66 )
+            if ( ea.bytes < 16 || vex.pfx == vex_f3 )
                 mxcsr = MXCSR_MM;
             else if ( vcpu_has_misalignsse() )
                 asm ( "stmxcsr %0" : "=m" (mxcsr) );

[-- Attachment #3: Type: text/plain, Size: 127 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86emul: suppress alignment check for {, v}mov{d, q}
  2016-11-10 12:29 [PATCH] x86emul: suppress alignment check for {, v}mov{d, q} Jan Beulich
@ 2016-11-11 15:36 ` Andrew Cooper
  2016-11-12  6:45   ` Wei Liu
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Cooper @ 2016-11-11 15:36 UTC (permalink / raw)
  To: Jan Beulich, xen-devel; +Cc: Wei Liu

On 10/11/16 12:29, Jan Beulich wrote:
> When introducing support for these instructions, adjustment for the
> alignment check logic (generating #GP(0)) was overlooked.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86emul: suppress alignment check for {, v}mov{d, q}
  2016-11-11 15:36 ` Andrew Cooper
@ 2016-11-12  6:45   ` Wei Liu
  0 siblings, 0 replies; 3+ messages in thread
From: Wei Liu @ 2016-11-12  6:45 UTC (permalink / raw)
  To: Andrew Cooper; +Cc: xen-devel, Wei Liu, Jan Beulich

On Fri, Nov 11, 2016 at 03:36:13PM +0000, Andrew Cooper wrote:
> On 10/11/16 12:29, Jan Beulich wrote:
> > When introducing support for these instructions, adjustment for the
> > alignment check logic (generating #GP(0)) was overlooked.
> >
> > Signed-off-by: Jan Beulich <jbeulich@suse.com>
> 
> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>

Applied.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-11-12  6:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-10 12:29 [PATCH] x86emul: suppress alignment check for {, v}mov{d, q} Jan Beulich
2016-11-11 15:36 ` Andrew Cooper
2016-11-12  6:45   ` Wei Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).