x86/HVM: hvmemul_cmpxchg() should also use known_gla()
authorJan Beulich <jbeulich@suse.com>
Thu, 15 Nov 2018 12:36:52 +0000 (13:36 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 15 Nov 2018 12:36:52 +0000 (13:36 +0100)
commit2262e808f4665bee820b5bb536aff47e560bdcc3
tree215059b20066d9189b6f352fad80c8b83224d796
parentbfdd5e58763a32afdf04b022e2698d39ae4cf4d6
x86/HVM: hvmemul_cmpxchg() should also use known_gla()

To be consistent with the write and rmw cases the mapping approach
should not be used when the guest linear address translation is known.
This in particular excludes the discard-write case from bypassing the
emulation path. This also means that now EFLAGS should actually get
properly updated, despite the discarded write portion of the memory
access.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Paul Durrant <paul.durrant@citrix.com>
xen/arch/x86/hvm/emulate.c