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

2015-05-01 Thread Jan Beulich
>>> Eugene Korenevsky 04/28/15 11:54 PM >>> >--- a/xen/arch/x86/x86_emulate/x86_emulate.c >+++ b/xen/arch/x86/x86_emulate/x86_emulate.c >@@ -4343,7 +4343,8 @@ x86_emulate( >/* Save real source value, then compare EAX against destination. */ >src.orig_val = src.val; >src.val = _regs.eax; >-

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

2015-04-28 Thread Eugene Korenevsky
CMPXCHG sets CF, PF, AF, SF, and OF flags according to the results of the comparison the rAX with the operand of the instruction. rAX must be the first argument of the comparison (a minuend), the operand must be the second one (a subtrahend). Due to improper order of comparison arguments, CF, PF,