qemu-patch-raspberry4/target-ppc
David Gibson be40edcd87 ppc: Remove broken partial PVR matching
The ppc target contains a ppc_find_by_pvr() function, which looks up a
CPU spec based on a PVR (that is, based on the value in the target cpu's
Processor Version Register).  PVR values contain information on both the
cpu model (upper 16 bits, usually) and on the precise revision (low 16
bits, usually).

ppc_find_by_pvr, as well as making exact PVR matches, attempts to find
"close" PVR matches, when we don't have a CPU spec for the exact revision
specified.  This sounds like a good idea, execpt that the current logic
is completely nonsensical.

It seems to assume CPU families are subdivided bit by bit in the PVR in a
way they just aren't.  Specifically, it requires a match on all bits of the
specified pvr up to the last non-zero bit.  This has the bizarre effect
that when the low bits are simply a sequential revision number (a common
though not universal pattern), then odd specified revisions must be matched
exactly, whereas even specified revisions will also match the next odd
revision, likewise for powers of 4, 8 and so forth.

To correctly do inexact matching we'd need to re-organize the table of CPU
specs to include a mask showing what PVR range the spec is compatible with
(similar to the cputable code in the Linux kernel).

For now, just remove the bogosity by only permitting exact PVR matches.
That at least makes the matching simple and consistent.  If we need inexact
matching we can add the necessary per-subfamily masks later.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Alexander Graf <agraf@suse.de>
2011-10-30 17:11:54 +01:00
..
cpu.h PPC: booke timers 2011-10-06 09:48:09 +02:00
helper.c pseries: Support SMT systems for KVM Book3S-HV 2011-10-30 17:11:53 +01:00
helper.h target-ppc: remove old CONFIG_SOFTFLOAT #ifdef 2011-06-03 16:07:48 +02:00
helper_regs.h Replace always_inline with inline 2009-08-16 09:06:54 +00:00
kvm.c pseries: Add device tree properties for VMX/VSX and DFP under kvm 2011-10-30 17:11:53 +01:00
kvm_ppc.c PPC: KVM: Remove kvmppc_read_host_property 2011-10-06 09:43:35 +02:00
kvm_ppc.h pseries: Add device tree properties for VMX/VSX and DFP under kvm 2011-10-30 17:11:53 +01:00
machine.c PPC: move TLBs to their own arrays 2011-06-17 02:58:37 +02:00
mfrom_table.c find -type f | xargs sed -i 's/[\t ]$//g' # on most files 2007-09-16 21:08:06 +00:00
mfrom_table_gen.c find -type f | xargs sed -i 's/[\t ]*$//g' # Yes, again. Note the star in the regex. 2007-09-17 08:09:54 +00:00
op_helper.c softmmu_header: pass CPUState to tlb_fill 2011-10-01 09:31:26 +00:00
STATUS Fix typos in comments (chek -> check) 2011-05-22 22:31:45 +01:00
translate.c Set an invalid-bits mask for each SPE instructions 2011-10-30 17:11:53 +01:00
translate_init.c ppc: Remove broken partial PVR matching 2011-10-30 17:11:54 +01:00