mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 17:23:56 -06:00
target/ppc/mmu: Use LPCR:HR to chose radix vs. hash translation
Now that LPCR:HR is set properly for SPAPR, use it for deciding the translation type, which also works for bare metal Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Cédric Le Goater <clg@kaod.org> Message-Id: <20190215170029.15641-3-clg@kaod.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
00fd075e18
commit
38c784a1cc
3 changed files with 21 additions and 13 deletions
|
@ -43,14 +43,18 @@ static inline bool ppc64_use_proc_tbl(PowerPCCPU *cpu)
|
|||
return !!(cpu->env.spr[SPR_LPCR] & LPCR_UPRT);
|
||||
}
|
||||
|
||||
static inline bool ppc64_radix_guest(PowerPCCPU *cpu)
|
||||
/*
|
||||
* The LPCR:HR bit is a shortcut that avoids having to
|
||||
* dig out the partition table in the fast path. This is
|
||||
* also how the HW uses it.
|
||||
*/
|
||||
static inline bool ppc64_v3_radix(PowerPCCPU *cpu)
|
||||
{
|
||||
PPCVirtualHypervisorClass *vhc =
|
||||
PPC_VIRTUAL_HYPERVISOR_GET_CLASS(cpu->vhyp);
|
||||
|
||||
return !!(vhc->get_patbe(cpu->vhyp) & PATBE1_GR);
|
||||
return !!(cpu->env.spr[SPR_LPCR] & LPCR_HR);
|
||||
}
|
||||
|
||||
hwaddr ppc64_v3_get_phys_page_debug(PowerPCCPU *cpu, vaddr eaddr);
|
||||
|
||||
int ppc64_v3_handle_mmu_fault(PowerPCCPU *cpu, vaddr eaddr, int rwx,
|
||||
int mmu_idx);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue