From: Jan Beulich Date: Mon, 16 Dec 2024 12:32:19 +0000 (+0100) Subject: x86emul: MOVBE requires a memory operand X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=3a9e5a93e6ed5300f25612963c0fe521156951a1;p=people%2Fandrewcoop%2Fxen.git x86emul: MOVBE requires a memory operand The reg-reg forms should cause #UD; they come into existence only with APX, where MOVBE also extends BSWAP (for the latter not being "eligible" to a REX2 prefix). Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper master commit: 4c5d9a01f8fa81417a9c431e9624fb71361ec4f9 master date: 2024-12-02 09:50:14 +0100 --- diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c b/xen/arch/x86/x86_emulate/x86_emulate.c index 905c6abf42..09ab75d035 100644 --- a/xen/arch/x86/x86_emulate/x86_emulate.c +++ b/xen/arch/x86/x86_emulate/x86_emulate.c @@ -6944,6 +6944,7 @@ x86_emulate( case X86EMUL_OPC(0x0f38, 0xf0): /* movbe m,r */ case X86EMUL_OPC(0x0f38, 0xf1): /* movbe r,m */ + generate_exception_if(ea.type != OP_MEM, X86_EXC_UD); vcpu_must_have(movbe); switch ( op_bytes ) {