]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: Dirty the dest op page on cmpxchg emulation
authorNadav Amit <namit@cs.technion.ac.il>
Mon, 26 Jan 2015 07:32:21 +0000 (09:32 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 26 Jan 2015 11:14:18 +0000 (12:14 +0100)
commit10a3e8c8a8ef7520b55cb1811db51adaca760833
tree43b8ec0a3384b01008d27e647ee1615fbb1a0aa2
parent3aadb3f1756ed88e15f3cd8552f564309d2deb49
KVM: x86: Dirty the dest op page on cmpxchg emulation

Intel SDM says for CMPXCHG: "To simplify the interface to the processor’s bus,
the destination operand receives a write cycle without regard to the result of
the comparison.". This means the destination page should be dirtied.

Fix it to by writing back the original value if cmpxchg failed.

Signed-off-by: Nadav Amit <namit@cs.technion.ac.il>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/emulate.c