]> xenbits.xensource.com Git - xen.git/commitdiff
x86emul: MOVBE requires a memory operand
authorJan Beulich <jbeulich@suse.com>
Mon, 16 Dec 2024 12:34:19 +0000 (13:34 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 16 Dec 2024 12:34:19 +0000 (13:34 +0100)
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 <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
master commit: 4c5d9a01f8fa81417a9c431e9624fb71361ec4f9
master date: 2024-12-02 09:50:14 +0100

xen/arch/x86/x86_emulate/x86_emulate.c

index 0245d23ca73d4053d818c73a1a748cfa148f6124..2c6bc8df2c87778ad075d5fff2a07aa40ffd204a 100644 (file)
@@ -6912,6 +6912,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 )
         {