qemu/target/ppc
David Gibson 9d6f106552 ppc: Rewrite ppc_set_compat()
This rewrites the ppc_set_compat() function so that instead of open coding
the various compatibility modes, it reads the relevant data from a table.
This is a first step in consolidating the information on compatibility
modes scattered across the code into a single place.

It also makes one change to the logic.  The old code masked the bits
to be set in the PCR (Processor Compatibility Register) by which bits
are valid on the host CPU.  This made no sense, since it was done
regardless of whether our guest CPU was the same as the host CPU or
not.  Furthermore, the actual PCR bits are only relevant for TCG[1] -
KVM instead uses the compatibility mode we tell it in
kvmppc_set_compat().  When using TCG host cpu information usually
isn't even present.

While we're at it, we put the new implementation in a new file to make the
enormous translate_init.c a little smaller.

[1] Actually it doesn't even do anything in TCG, but it will if / when we
    get to implementing compatibility mode logic at that level.

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: implement stxvll instructions 2017-01-31 10:10:13 +11:00
arch_dump.c
compat.c ppc: Rewrite ppc_set_compat() 2017-01-31 10:10:13 +11:00
cpu-models.c
cpu-models.h
cpu-qom.h
cpu.h ppc: Rewrite ppc_set_compat() 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 xxperm and xxpermr instructions 2017-01-31 10:10:13 +11:00
gdbstub.c
helper_regs.h cputlb: drop flush_global flag from tlb_flush 2017-01-13 14:24:37 +00:00
helper.h target-ppc: implement stxvll instructions 2017-01-31 10:10:13 +11:00
int_helper.c target-ppc: Implement bcd_is_valid function 2017-01-31 10:10:13 +11:00
internal.h target-ppc: move ppc_vsr_t to common header 2017-01-31 10:10:13 +11:00
kvm_ppc.h ppc: Rename cpu_version to compat_pvr 2017-01-31 10:10:13 +11:00
kvm-stub.c
kvm.c ppc: Rename cpu_version to compat_pvr 2017-01-31 10:10:13 +11:00
machine.c migration: extend VMStateInfo 2017-01-24 17:54:47 +00:00
Makefile.objs ppc: Rewrite ppc_set_compat() 2017-01-31 10:10:13 +11:00
mem_helper.c target-ppc: implement stxvll instructions 2017-01-31 10:10:13 +11:00
mfrom_table_gen.c
mfrom_table.c
misc_helper.c cputlb: drop flush_global flag from tlb_flush 2017-01-13 14:24:37 +00:00
mmu_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
monitor.c
STATUS
timebase_helper.c
trace-events
translate_init.c ppc: Rewrite ppc_set_compat() 2017-01-31 10:10:13 +11:00
translate.c target-ppc: implement stop instruction 2017-01-31 10:10:13 +11:00
user_only_helper.c