x86emul: drop "seg" parameter from insn_fetch() hook
authorJan Beulich <jbeulich@suse.com>
Tue, 14 Dec 2021 08:48:17 +0000 (09:48 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 14 Dec 2021 08:48:17 +0000 (09:48 +0100)
commit7b99e7258559c9caa235d9faf323b22c68e4a581
treef43039d8ff2e8db1387c6e3f974c938410735e7e
parentc49ee0329ff3de98722fd74ed5ba6d9665701e54
x86emul: drop "seg" parameter from insn_fetch() hook

This is specified (and asserted for in a number of places) to always be
CS. Passing this as an argument in various places is therefore
pointless. The price to pay is two simple new functions, with the
benefit of the PTWR case now gaining a more appropriate error code.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Paul Durrant <paul@xen.org>
12 files changed:
tools/fuzz/x86_instruction_emulator/fuzz-emul.c
tools/tests/x86_emulator/predicates.c
tools/tests/x86_emulator/test_x86_emulator.c
tools/tests/x86_emulator/x86-emulate.h
xen/arch/x86/hvm/emulate.c
xen/arch/x86/mm/shadow/hvm.c
xen/arch/x86/pv/emul-gate-op.c
xen/arch/x86/pv/emul-priv-op.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/hvm/emulate.h