Jan Beulich
2007-Feb-15 09:58 UTC
[Xen-devel] [PATCH] 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 <jbeulich@novell.com> Index: 2007-02-07/xen/arch/x86/x86_emulate.c ==================================================================--- 2007-02-07.orig/xen/arch/x86/x86_emulate.c 2007-02-08 08:46:39.000000000 +0100 +++ 2007-02-07/xen/arch/x86/x86_emulate.c 2007-02-08 09:32:00.000000000 +0100 @@ -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 ) { _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Seemingly Similar Threads
- [PATCH 4/4] x86/emulator: cleanup
- [PATCH 3/4] x86/emulator: properly handle lzcnt and tzcnt
- [PATCH] x86: fix emulation of indirect far calls and jumps
- [PATCH] x86-64: emulation support for cmpxchg16b
- x86_emulate(): forgot to generate_exception_if() for 0xff?