History | View | Annotate | Download (3.2 kB)
mmu-hash32: Clean up BAT matching logic
The code to search for a matching BAT for a virtual address is somewhatlongwinded and awkward. In particular, it relies on seperate size andvalidity information being returned from the hash32_bat_size() function...
mmu-hash*: Separate PTEG searching from permissions checking
find_pte{32,64{() do several things. First they search through a PTEGooking for a PTE matching our virtual address. Then they do permissionschecking and other processing on that PTE.
This patch separates the search by VA out from the rest. The search is...
target-ppc: Disentangle hash mmu versions of cpu_get_phys_page_debug()
cpu_get_phys_page_debug() is a trivial wrapper aroundget_physical_address(). But even the signature ofget_physical_address() has some things we'd like to clean up on aper-mmu basis, so this patch moves the test on mmu model out to...
target-ppc: Don't share get_pteg_offset() between 32 and 64-bit
The get_pteg_offset() helper function is currently shared between 32-bitand 64-bit hash mmus, taking a parameter for the hash pte size. In the64-bit paths, it's only called in one place, and it's a trivial...
mmu-hash*: Add header file for definitions
Currently cpu.h contains a number of definitions relating to the 64-bithash MMU. Some are used in the MMU emulation code, but some are only usedin the spapr MMU management hcall implementations.
This patch moves these definitions (except for a few that are needed...
mmu-hash*: Add hash pte load/store helpers
On real hardware the ppc hash page table is stored in memory; accordinglyour mmu emulation code can read a hash page table in guest memory. But,when paravirtualized under PAPR, the real hash page table is in host...
target-ppc: Disentangle pte_check()
Currently support for both 32-bit and 64-bit hash MMUs share animplementation of pte_check. But there are enough differences that thismeans the shared function has several very ugly conditionals on "is_64b".
This patch cleans things up by separating out the 64-bit version...
target-ppc: Disentangle find_pte()
32-bit and 64-bit hash MMU implementations currently share a find_ptefunction. This results in a whole bunch of ugly conditionals in the sharedfunction, and not all that much actually shared code.
This patch separates out the 32-bit and 64-bit versions, putting then...
target-ppc: Disentangle get_segment()
The poorly named get_segment() function handles most of the addresstranslation logic for hash-based MMUs. It has many ugly conditionals onwhether the MMU is 32-bit or 64-bit.
This patch splits the function into 32 and 64-bit versions, using the...
target-ppc: Disentangle get_physical_address() paths
Depending on the MSR state, for 64-bit hash MMUs, get_physical_addresscan either call check_physical (which has further tests for mmu type)or get_segment64. Similarly for 32-bit hash MMUs we can either call...
target-ppc: Disentangle hash mmu paths for cpu_ppc_handle_mmu_fault
cpu_ppc_handle_mmu_fault() calls get_physical_address() (whose behaviourdepends on MMU type) then, if that fails, issues an appropriate exception- which again has a number of dependencies on MMU type....