qemu-patch-raspberry4/target-ppc
David Gibson f95d7cc7fe mmu-hash*: Don't keep looking for PTEs after we find a match
BEHAVIOUR CHANGE

The ppc hash mmu hashes each virtual address to a primary and secondary
possible hash bucket (aka PTE group or PTEG) each with 8 PTEs.  Then we
need a linear search through the PTEs to find the correct one for the
virtual address we're translating.

It is a programming error for the guest to insert multiple PTEs mapping the
same virtual address into a PTEG - in this case the ppc architecture says
the MMU can either act as if just one was present, or give a machine check.
Currently our code takes the first matching PTE in a PTEG if it finds a
successful translation.  But if a matching PTE is found, but permission
bits don't allow the access, we keep looking through the PTEG, checking
that any other matching PTEs contain an identical translation.

That behaviour is perhaps not exactly wrong, but it's certainly not useful.
This patch changes it to always just find the first matching PTE in a PTEG.

In addition, if we get a permissions problem on the primary PTEG, we then
search the secondary PTEG.  This is incorrect - a permission denying PTE
in the primary PTEG should not be overwritten by an access granting PTE in
the secondary (although again, it would be a programming error for the
guest to set up such a situation anyway).  So additionally we update the
code to only search the secondary PTEG if no matching PTE is found in the
primary at all.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Alexander Graf <agraf@suse.de>
2013-03-22 15:28:50 +01:00
..
cpu-models.c target-ppc: Remove vestigial PowerPC 620 support 2013-03-22 15:28:46 +01:00
cpu-models.h target-ppc: Move CPU aliases out of translate_init.c 2013-03-08 21:04:53 +01:00
cpu-qom.h cpu: Replace do_interrupt() by CPUClass::do_interrupt method 2013-03-12 10:35:55 +01:00
cpu.h mmu-hash*: Add header file for definitions 2013-03-22 15:28:48 +01:00
excp_helper.c cpu: Replace do_interrupt() by CPUClass::do_interrupt method 2013-03-12 10:35:55 +01:00
fpu_helper.c PPC/GDB: handle read and write of fpscr 2013-03-22 15:28:46 +01:00
helper.h target-ppc: Remove vestigial PowerPC 620 support 2013-03-22 15:28:46 +01:00
helper_regs.h cpu: Move halted and interrupt_request fields to CPUState 2013-03-12 10:35:55 +01:00
int_helper.c target-ppc: Split out SO, OV, CA fields from XER 2013-02-23 17:25:30 +00:00
kvm.c mmu-hash*: Add header file for definitions 2013-03-22 15:28:48 +01:00
kvm_ppc.c softmmu: move include files to include/sysemu/ 2012-12-19 08:32:45 +01:00
kvm_ppc.h PPC: KVM: Add support for EPR with KVM 2013-01-18 19:06:57 +01:00
machine.c target-ppc: Remove vestigial PowerPC 620 support 2013-03-22 15:28:46 +01:00
Makefile.objs target-ppc: Disentangle pte_check() 2013-03-22 15:28:47 +01:00
mem_helper.c PPC: Unify dcbzl code path 2013-02-01 01:52:02 +01: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 fix spelling in target sub directory 2011-12-02 10:50:57 +00:00
misc_helper.c target-ppc: Remove vestigial PowerPC 620 support 2013-03-22 15:28:46 +01:00
mmu-hash32.c mmu-hash*: Don't keep looking for PTEs after we find a match 2013-03-22 15:28:50 +01:00
mmu-hash32.h mmu-hash*: Add hash pte load/store helpers 2013-03-22 15:28:48 +01:00
mmu-hash64.c mmu-hash*: Don't keep looking for PTEs after we find a match 2013-03-22 15:28:50 +01:00
mmu-hash64.h mmu-hash*: Add hash pte load/store helpers 2013-03-22 15:28:48 +01:00
mmu_helper.c target-ppc: mmu_ctx_t should not be a global type 2013-03-22 15:28:48 +01:00
STATUS Fix typos in comments (chek -> check) 2011-05-22 22:31:45 +01:00
timebase_helper.c ppc: Avoid AREG0 for timebase helpers 2012-06-24 01:04:43 +02:00
translate.c target-ppc: Remove vestigial PowerPC 620 support 2013-03-22 15:28:46 +01:00
translate_init.c target-ppc: Remove vestigial PowerPC 620 support 2013-03-22 15:28:46 +01:00