aboutsummaryrefslogtreecommitdiff
path: root/target-ppc/mmu-hash32.h
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2013-03-12 00:31:27 +0000
committerAlexander Graf <agraf@suse.de>2013-03-22 15:28:50 +0100
commitf95d7cc7fecbc0e320e83c864ce2d99fee3d9236 (patch)
treee0c61f64c325bb0766b8b5e1859d1178c1118c40 /target-ppc/mmu-hash32.h
parentbb218042c8b4e4bbcf2ab3c8d961d78876178831 (diff)
downloadqemu-f95d7cc7fecbc0e320e83c864ce2d99fee3d9236.zip
qemu-f95d7cc7fecbc0e320e83c864ce2d99fee3d9236.tar.gz
qemu-f95d7cc7fecbc0e320e83c864ce2d99fee3d9236.tar.bz2
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>
Diffstat (limited to 'target-ppc/mmu-hash32.h')
0 files changed, 0 insertions, 0 deletions