x86emul: correctly handle CMPXCHG* comparison failures
authorJan Beulich <jbeulich@suse.com>
Thu, 22 Mar 2018 09:38:39 +0000 (10:38 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 22 Mar 2018 09:38:39 +0000 (10:38 +0100)
commit3aaa72b3f1132d078e0b1f1af5b2bcc2d1629b92
tree9018ce2ee1a5428669332338c939ea11b75748e4
parent3c78c287aacf897511a33cde27001b6bfabbf69f
x86emul: correctly handle CMPXCHG* comparison failures

If the ->cmpxchg() hook finds a mismatch, we should deal with this the
same way as when the "manual" comparison reports a mismatch.

This involves reverting bfce0e62c3 ("x86/emul: Drop
X86EMUL_CMPXCHG_FAILED"), albeit with X86EMUL_CMPXCHG_FAILED now
becoming a value distinct from X86EMUL_RETRY.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
xen/arch/x86/mm/shadow/common.c
xen/arch/x86/mm/shadow/multi.c
xen/arch/x86/pv/ro-page-fault.c
xen/arch/x86/x86_emulate/x86_emulate.c
xen/arch/x86/x86_emulate/x86_emulate.h
xen/include/asm-x86/paging.h