x86emul: generalize wbinvd() hook
authorJan Beulich <jbeulich@suse.com>
Mon, 2 Sep 2019 12:40:15 +0000 (14:40 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 2 Sep 2019 12:40:15 +0000 (14:40 +0200)
commit52dba7bd0b36c1c6651f744dab5b6a7d34af3b20
tree40f28078ddec8be9062174c23aed48b17c0a27de
parent7ad6f2a9befcd4b0f1b51f26dcc2a86797de0fc6
x86emul: generalize wbinvd() hook

The hook is already in use for other purposes, and emulating e.g.
CLFLUSH by issuing WBINVD is, well, not very nice. Rename the hook and
add parameters. Use lighter weight flushing insns when possible in
hvmemul_cache_op().

hvmemul_cache_op() treating x86emul_invd the same as x86emul_wbinvd is
to retain original behavior, but I'm not sure this is what we want in
the long run.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Paul Durrant <paul.durrant@citrix.com>
tools/fuzz/x86_instruction_emulator/fuzz-emul.c
xen/arch/x86/Rules.mk
xen/arch/x86/hvm/emulate.c
xen/arch/x86/pv/emul-priv-op.c
xen/arch/x86/x86_emulate/x86_emulate.c
xen/arch/x86/x86_emulate/x86_emulate.h
xen/include/asm-x86/cpufeature.h
xen/include/asm-x86/system.h