[Xen-devel] [PATCH 1/2] x86_emulate: fix emulation of CMPXCHG

2015-04-28 Thread Eugene Korenevsky
, AF, SF and OF flags were set incorrectly in the case of inequality. Need to swap them. Signed-off-by: Eugene Korenevsky --- xen/arch/x86/x86_emulate/x86_emulate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c b/xen/arch/x86

[Xen-devel] [PATCH 2/2] test_x86_emulate: adjust CMPXCHG test

2015-04-28 Thread Eugene Korenevsky
CMPXCHG: in the case of inequality of the rAX and the operand, need to check CF, PF, AF, SF and OF flags as well. This adjustment covers the fix of incorrect comparison during CMPXCHG emulation. Signed-off-by: Eugene Korenevsky --- tools/tests/x86_emulator/test_x86_emulator.c | 2 +- 1 file