[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen stable-4.18] x86emul: MOVBE requires a memory operand



commit 37b069fc3bb97cfcf5ae769a163bd02e460d9675
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Mon Dec 16 13:34:19 2024 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Mon Dec 16 13:34:19 2024 +0100

    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 <jbeulich@xxxxxxxx>
    Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    master commit: 4c5d9a01f8fa81417a9c431e9624fb71361ec4f9
    master date: 2024-12-02 09:50:14 +0100
---
 xen/arch/x86/x86_emulate/x86_emulate.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c 
b/xen/arch/x86/x86_emulate/x86_emulate.c
index 0245d23ca7..2c6bc8df2c 100644
--- a/xen/arch/x86/x86_emulate/x86_emulate.c
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c
@@ -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 )
         {
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.18



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.