qemu-patch-raspberry4/target/ppc
David Gibson 1d1be34d26 ppc: Clean up and QOMify hypercall emulation
The pseries machine type is a bit unusual in that it runs a paravirtualized
guest.  The guest expects to interact with a hypervisor, and qemu
emulates the functions of that hypervisor directly, rather than executing
hypervisor code within the emulated system.

To implement this in TCG, we need to intercept hypercall instructions and
direct them to the machine's hypercall handlers, rather than attempting to
perform a privilege change within TCG.  This is controlled by a global
hook - cpu_ppc_hypercall.

This cleanup makes the handling a little cleaner and more extensible than
a single global variable.  Instead, each CPU to have hypercalls intercepted
has a pointer set to a QOM object implementing a new virtual hypervisor
interface.  A method in that interface is called by TCG when it sees a
hypercall instruction.  It's possible we may want to add other methods in
future.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2017-01-31 10:10:13 +11:00
..
translate target-ppc: add vextu[bhw][lr]x instructions 2017-01-31 10:10:13 +11:00
arch_dump.c
cpu-models.c
cpu-models.h
cpu-qom.h
cpu.h ppc: Clean up and QOMify hypercall emulation 2017-01-31 10:10:13 +11:00
dfp_helper.c
excp_helper.c ppc: Clean up and QOMify hypercall emulation 2017-01-31 10:10:13 +11:00
fpu_helper.c target-ppc: Add xscmpoqp and xscmpuqp instructions 2017-01-31 10:10:12 +11:00
gdbstub.c
helper.h target-ppc: add vextu[bhw][lr]x instructions 2017-01-31 10:10:13 +11:00
helper_regs.h cputlb: drop flush_global flag from tlb_flush 2017-01-13 14:24:37 +00:00
int_helper.c target-ppc: add vextu[bhw][lr]x instructions 2017-01-31 10:10:13 +11:00
internal.h target-ppc: implement lxv/lxvx and stxv/stxvx 2017-01-31 10:10:12 +11:00
kvm-stub.c
kvm.c kvm: move cpu synchronization code 2017-01-19 22:07:46 +01:00
kvm_ppc.h KVM: PPC: eliminate unnecessary duplicate constants 2017-01-19 22:06:53 +01:00
machine.c migration: extend VMStateInfo 2017-01-24 17:54:47 +00:00
Makefile.objs
mem_helper.c
mfrom_table.c
mfrom_table_gen.c
misc_helper.c cputlb: drop flush_global flag from tlb_flush 2017-01-13 14:24:37 +00:00
mmu-hash32.c
mmu-hash32.h
mmu-hash64.c kvm: move cpu synchronization code 2017-01-19 22:07:46 +01:00
mmu-hash64.h
mmu_helper.c cputlb: drop flush_global flag from tlb_flush 2017-01-13 14:24:37 +00:00
monitor.c
STATUS
timebase_helper.c
trace-events
translate.c target-ppc: implement lxv/lxvx and stxv/stxvx 2017-01-31 10:10:12 +11:00
translate_init.c ppc: Clean up and QOMify hypercall emulation 2017-01-31 10:10:13 +11:00
user_only_helper.c