From: Jan Beulich Date: Fri, 16 Dec 2016 13:37:11 +0000 (+0100) Subject: x86emul: CMPXCHG16B requires an aligned operand X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~66^2~3116 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=d7d3a82c28a1102ee6c9707071a946164bae0d57;p=xen.git x86emul: CMPXCHG16B requires an aligned operand This distinguishes it from CMPXCHG8B. Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper --- diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c b/xen/arch/x86/x86_emulate/x86_emulate.c index 921933c11c..6313b57bf8 100644 --- a/xen/arch/x86/x86_emulate/x86_emulate.c +++ b/xen/arch/x86/x86_emulate/x86_emulate.c @@ -5413,6 +5413,9 @@ x86_emulate( if ( rex_prefix & REX_W ) { 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