x86 emulation: suppress rep prefix handling on non-repeatable instructions
PATCH 1/1 x86 emulation: suppress rep prefix handling on non-repeatable instructions
Otherwise, pause or the recommended one-byte ret workaround on AMD processors may have ill side effects.
Signed-off-by Jan Beulich <[email protected]>
xen/arch/x86/x86_emulate.c +3 -1
@@ -1579,7 +1579,9 @@ x86_emulate(if ( twobyte ) goto twobyte_special_insn; -if ( rep_prefix ) +if ( rep_prefix && + (((b & ~0xf ) ==0xa0 && ((0xfcf0 >> (b &0xf )) &1 )) || + (b & ~3 ) ==0x6c ) ) {if ( _regs.ecx ==0 ) {