• N
    KVM: x86: Wrong emulation on 'xadd X, X' · ee212297
    Nadav Amit 提交于
    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 the destination.  The only
    instruction which should be affected is xadd, as the other instructions that
    perform writeback to the source use the extended accumlator (e.g., RAX:RDX).
    Signed-off-by: NNadav Amit <namit@cs.technion.ac.il>
    Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
    ee212297
emulate.c 124.3 KB