x86emul: suppress alignment check for {,v}mov{d,q}
authorJan Beulich <JBeulich@suse.com>
Thu, 10 Nov 2016 12:29:32 +0000 (05:29 -0700)
committerWei Liu <wei.liu2@citrix.com>
Sat, 12 Nov 2016 06:45:16 +0000 (06:45 +0000)
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>
Release-acked-by: Wei Liu <wei.liu2@citrix.com>
xen/arch/x86/x86_emulate/x86_emulate.c

index 67ef31d515998cdf771a81c719b2ee2d718b3030..26214877c334d8bf679c34ef09e6fd366198b17e 100644 (file)
@@ -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) );