Skip to contentSkip to conversation

x86emul: MOVRS are NOREP

PATCH In review Jan Beulich 2 participants 2 messages Nov 16 – Nov 23

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86emul: MOVRS are NOREP

REP prefixes alter the encoding (to, presently, #UD), which wants reflecting in what is recorded during decode.

Fixes 59b18eb757db ("x86emul: support non-SIMD MOVRS")
xen/arch/x86/x86_emulate/decode.c +2 -0
@@ -918,6 +918,8 @@ decode_0f38(struct x86_emulate_state *s,
         s->desc = DstReg | SrcMem | Mov;
         if ( !(ctxt->opcode & 1) )
             s->desc |= ByteOp;
+        if ( s->vex.pfx >= vex_f3 )
+            ctxt->opcode |= MASK_INSR(s->vex.pfx, X86EMUL_OPC_PFX_MASK);
         s->simd_size = simd_none;
         break;