qemu-patch-raspberry4/target/ppc
David Gibson e57ca75ce3 target/ppc: Manage external HPT via virtual hypervisor
The pseries machine type implements the behaviour of a PAPR compliant
hypervisor, without actually executing such a hypervisor on the virtual
CPU.  To do this we need some hooks in the CPU code to make hypervisor
facilities get redirected to the machine instead of emulated internally.

For hypercalls this is managed through the cpu->vhyp field, which points
to a QOM interface with a method implementing the hypercall.

For the hashed page table (HPT) - also a hypervisor resource - we use an
older hack.  CPUPPCState has an 'external_htab' field which when non-NULL
indicates that the HPT is stored in qemu memory, rather than within the
guest's address space.

For consistency - and to make some future extensions easier - this merges
the external HPT mechanism into the vhyp mechanism.  Methods are added
to vhyp for the basic operations the core hash MMU code needs: map_hptes()
and unmap_hptes() for reading the HPT, store_hpte() for updating it and
hpt_mask() to retrieve its size.

To match this, the pseries machine now sets these vhyp fields in its
existing vhyp class, rather than reaching into the cpu object to set the
external_htab field.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
2017-03-01 11:23:39 +11:00
..
translate target-ppc: Add xscvqpudz and xscvqpuwz instructions 2017-02-22 11:28:28 +11:00
arch_dump.c Move target-* CPU file into a target/ folder 2016-12-20 21:52:12 +01:00
compat.c ppc: Add ppc_set_compat_all() 2017-01-31 10:10:14 +11:00
cpu-models.c target/ppc/cpu-models: Fix/remove bad CPU aliases 2017-01-31 13:46:26 +11:00
cpu-models.h powerpc/cpu-models: rename ISAv3.00 logical PVR definition 2017-01-31 10:10:14 +11:00
cpu-qom.h target/ppc/POWER9: Add ISAv3.00 MMU definition 2017-02-22 11:28:28 +11:00
cpu.c target/ppc: move cpu_[read, write]_xer to cpu.c 2017-03-01 11:23:38 +11:00
cpu.h target/ppc: Manage external HPT via virtual hypervisor 2017-03-01 11:23:39 +11:00
dfp_helper.c Move target-* CPU file into a target/ folder 2016-12-20 21:52:12 +01:00
excp_helper.c ppc: Clean up and QOMify hypercall emulation 2017-01-31 10:10:13 +11:00
fpu_helper.c target-ppc: Add xscvqpudz and xscvqpuwz instructions 2017-02-22 11:28:28 +11:00
gdbstub.c Move target-* CPU file into a target/ folder 2016-12-20 21:52:12 +01:00
helper.h target-ppc: Add xscvqpudz and xscvqpuwz instructions 2017-02-22 11:28:28 +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: introduce helper_update_ov_legacy 2017-03-01 11:23:39 +11:00
internal.h target-ppc: implement load atomic instruction 2017-02-22 11:28:27 +11:00
kvm-stub.c Move target-* CPU file into a target/ folder 2016-12-20 21:52:12 +01:00
kvm.c target/ppc: Manage external HPT via virtual hypervisor 2017-03-01 11:23:39 +11:00
kvm_ppc.h target/ppc: Fix KVM-HV HPTE accessors 2017-03-01 11:23:39 +11:00
machine.c target/ppc: Manage external HPT via virtual hypervisor 2017-03-01 11:23:39 +11:00
Makefile.objs target/ppc: move cpu_[read, write]_xer to cpu.c 2017-03-01 11:23:38 +11:00
mem_helper.c target-ppc: implement stxvll instructions 2017-01-31 10:10:13 +11:00
mfrom_table.c Move target-* CPU file into a target/ folder 2016-12-20 21:52:12 +01:00
mfrom_table_gen.c Move target-* CPU file into a target/ folder 2016-12-20 21:52:12 +01:00
misc_helper.c target/ppc: SDR1 is a hypervisor resource 2017-03-01 11:23:39 +11:00
mmu-hash32.c target/ppc: Eliminate htab_base and htab_mask variables 2017-03-01 11:23:39 +11:00
mmu-hash32.h target/ppc: Manage external HPT via virtual hypervisor 2017-03-01 11:23:39 +11:00
mmu-hash64.c target/ppc: Manage external HPT via virtual hypervisor 2017-03-01 11:23:39 +11:00
mmu-hash64.h target/ppc: Manage external HPT via virtual hypervisor 2017-03-01 11:23:39 +11:00
mmu_helper.c target/ppc: Manage external HPT via virtual hypervisor 2017-03-01 11:23:39 +11:00
monitor.c monitor: Fix crashes when using HMP commands without CPU 2017-02-21 18:29:01 +00:00
STATUS Move target-* CPU file into a target/ folder 2016-12-20 21:52:12 +01:00
timebase_helper.c Move target-* CPU file into a target/ folder 2016-12-20 21:52:12 +01:00
trace-events Move target-* CPU file into a target/ folder 2016-12-20 21:52:12 +01:00
translate.c target/ppc: optimize gen_write_xer() 2017-03-01 11:23:38 +11:00
translate_init.c target/ppc: SDR1 is a hypervisor resource 2017-03-01 11:23:39 +11:00
user_only_helper.c Move target-* CPU file into a target/ folder 2016-12-20 21:52:12 +01:00