]> xenbits.xensource.com Git - people/iwj/xen.git/commitdiff
x86emul: CMPXCHG16B requires an aligned operand
authorJan Beulich <jbeulich@suse.com>
Wed, 18 Jan 2017 08:49:26 +0000 (09:49 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 18 Jan 2017 08:49:26 +0000 (09:49 +0100)
This distinguishes it from CMPXCHG8B.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
master commit: d7d3a82c28a1102ee6c9707071a946164bae0d57
master date: 2016-12-16 14:37:11 +0100

xen/arch/x86/x86_emulate/x86_emulate.c

index ccaffca22d51d9df26f1d002437734b566975d29..6bb3c7462180ab26e4b5ec5bea6d5307c66b7a83 100644 (file)
@@ -5287,6 +5287,9 @@ x86_emulate(
         if ( op_bytes == 8 )
         {
             host_and_vcpu_must_have(cx16);
+            generate_exception_if(!is_aligned(ea.mem.seg, ea.mem.off, 16,
+                                              ctxt, ops),
+                                  EXC_GP, 0);
             op_bytes = 16;
         }
         else