Re: [PATCH 2/6] KVM: x86: Wrong emulation on 'xadd X, X'

2014-06-17 Thread Paolo Bonzini
Il 17/06/2014 17:35, Bandan Das ha scritto: Well, I meant it more as a review and "suggested changes" to this patchset Nadav posted, but yeah, if you prefer, I can post a change myself. I will make a pass through other uses of BUG() in the code too. I'd prefer that, there's no need to make Nada

Re: [PATCH 2/6] KVM: x86: Wrong emulation on 'xadd X, X'

2014-06-17 Thread Bandan Das
Paolo Bonzini writes: > Il 16/06/2014 19:38, Bandan Das ha scritto: >> Nadav Amit writes: >> >>> The emulator does not emulate the xadd instruction correctly if the two >>> operands are the same. In this (unlikely) situation the result should be >>> the >>> sum of X and X (2X) when it is curre

Re: [PATCH 2/6] KVM: x86: Wrong emulation on 'xadd X, X'

2014-06-16 Thread Paolo Bonzini
Il 16/06/2014 19:38, Bandan Das ha scritto: Nadav Amit writes: The emulator does not emulate the xadd instruction correctly if the two operands are the same. In this (unlikely) situation the result should be the sum of X and X (2X) when it is currently X. The solution is to first perform wri

Re: [PATCH 2/6] KVM: x86: Wrong emulation on 'xadd X, X'

2014-06-16 Thread Bandan Das
Nadav Amit writes: > The emulator does not emulate the xadd instruction correctly if the two > operands are the same. In this (unlikely) situation the result should be the > sum of X and X (2X) when it is currently X. The solution is to first perform > writeback to the source, before writing to