x86/emul: Reject MOVNTI without a memory operand
PATCH 1/1 x86/emul: Reject MOVNTI without a memory operand
MOVNTI encoded with two registers is treated as a plain reg->reg move by the emulator, but it's a nonsensical encoding which hardware rejects with #UD.
Fixes 372da9b41e0f ("x86: add movnti emulation")
Reported-by Teddy Astie <[email protected]>
Signed-off-by Andrew Cooper <[email protected]>
---
CC: Jan Beulich <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Teddy Astie <[email protected]>
--- xen/arch/x86/x86_emulate/x86_emulate.c | 1 + 1 file changed, 1 insertion(+)
xen/arch/x86/x86_emulate/x86_emulate.c +1 -0
@@ -5429,6 +5429,7 @@ x86_emulate(case X86EMUL_OPC (0x0f ,0xc3 ):/* movnti */ /* Ignore the non-temporal hint for now. */ +generate_exception_if (ea.type !=OP_MEM ,X86_EXC_UD );vcpu_must_have (sse2); dst.val = src.val; sfence = true;
base-commit: 3b65ff9f372fb85a453a952977cc033298cba8b5
Signature · 1 line
2.39.5
Quoted 6 lines · Andrew Cooper
MOVNTI encoded with two registers is treated as a plain
reg->regmove by the emulator, but it's a nonsensical encoding which hardware rejects with #UD.Fixes 372da9b41e0f ("x86: add movnti emulation")Reported-by Teddy Astie <[email protected]>Signed-off-by Andrew Cooper <[email protected]>
Reviewed-by Jan Beulich <[email protected]>