x86/HVM: never retain emulated insn cache when exiting back to guest
authorJan Beulich <jbeulich@suse.com>
Mon, 23 Apr 2018 09:01:09 +0000 (11:01 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 23 Apr 2018 09:01:09 +0000 (11:01 +0200)
commit25b0dad541e31bd892d57cbeafe8e0c0bf4e8385
treebd11fb42cc23cb213465acf8876ee15a8afeb7b9
parent8c02a19230502a9522b097ee15742599091064aa
x86/HVM: never retain emulated insn cache when exiting back to guest

Commit 5fcb26e69e ("x86/HVM: don't retain emulated insn cache when
exiting back to guest") didn't go quite far enough: The insn emulator
may itself decide to return X86EMUL_RETRY (currently for certain
CMPXCHG failures and AVX2 gather insns), in which case we'd also exit
back to guest context. Tie the caching to whether we have an I/O
completion pending, instead of x86_emulate()'s return value.

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