[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 17/40] booke206: fix booke206_tlbnps for mav 2.0
From: |
David Gibson |
Subject: |
[Qemu-devel] [PULL 17/40] booke206: fix booke206_tlbnps for mav 2.0 |
Date: |
Fri, 8 Sep 2017 20:35:35 +1000 |
From: KONRAD Frederic <address@hidden>
This fixes booke206_tlbnps for MAV 2.0 by checking the MMUCFG register and
return directly the right tlbnps instead of computing it from non existing
field.
Signed-off-by: KONRAD Frederic <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
target/ppc/cpu.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h
index cf4ded7b8e..21f0ddd056 100644
--- a/target/ppc/cpu.h
+++ b/target/ppc/cpu.h
@@ -2473,10 +2473,10 @@ static inline ppcmas_tlb_t
*booke206_get_tlbm(CPUPPCState *env, const int tlbn,
/* returns bitmap of supported page sizes for a given TLB */
static inline uint32_t booke206_tlbnps(CPUPPCState *env, const int tlbn)
{
- bool mav2 = false;
uint32_t ret = 0;
- if (mav2) {
+ if ((env->spr[SPR_MMUCFG] & MMUCFG_MAVN) == MMUCFG_MAVN_V2) {
+ /* MAV2 */
ret = env->spr[SPR_BOOKE_TLB0PS + tlbn];
} else {
uint32_t tlbncfg = env->spr[SPR_BOOKE_TLB0CFG + tlbn];
--
2.13.5
- [Qemu-devel] [PULL 00/40] ppc-for-2.11 queue 20170908, David Gibson, 2017/09/08
- [Qemu-devel] [PULL 02/40] hw/ppc: clear pending_events on machine reset, David Gibson, 2017/09/08
- [Qemu-devel] [PULL 03/40] hw/ppc: CAS reset on early device hotplug, David Gibson, 2017/09/08
- [Qemu-devel] [PULL 07/40] spapr_iommu: convert TCE table object to realize(), David Gibson, 2017/09/08
- [Qemu-devel] [PULL 04/40] spapr_pci: use memory_region_add_subregion() with DMA windows, David Gibson, 2017/09/08
- [Qemu-devel] [PULL 12/40] spapr_iommu: unregister vmstate at unrealize time, David Gibson, 2017/09/08
- [Qemu-devel] [PULL 05/40] spapr_iommu: use g_strdup_printf() instead of snprintf(), David Gibson, 2017/09/08
- [Qemu-devel] [PULL 17/40] booke206: fix booke206_tlbnps for mav 2.0,
David Gibson <=
- [Qemu-devel] [PULL 01/40] hw/ppc/spapr_drc.c: change spapr_drc_needed to use drc->dev, David Gibson, 2017/09/08
- [Qemu-devel] [PULL 08/40] spapr_pci: parent the MSI memory region to the PHB, David Gibson, 2017/09/08
- [Qemu-devel] [PULL 11/40] spapr_iommu: pass object ownership to parent/owner, David Gibson, 2017/09/08
- [Qemu-devel] [PULL 09/40] spapr_drc: add unrealize method to physical DRC class, David Gibson, 2017/09/08
- [Qemu-devel] [PULL 10/40] spapr_drc: pass object ownership to parent/owner, David Gibson, 2017/09/08
- [Qemu-devel] [PULL 14/40] e500: Use cpu_index instead of vcpu_dt_id, David Gibson, 2017/09/08
- [Qemu-devel] [PULL 21/40] spapr_iommu: Realloc guest visible TCE table when hot(un)plugging vfio-pci, David Gibson, 2017/09/08
- [Qemu-devel] [PULL 16/40] ppc: spapr: Make VCPU ID handling private to SPAPR, David Gibson, 2017/09/08
- [Qemu-devel] [PULL 06/40] spapr_drc: use g_strdup_printf() instead of snprintf(), David Gibson, 2017/09/08
- [Qemu-devel] [PULL 18/40] booke206: fix tlbnps for fixed size TLB, David Gibson, 2017/09/08