summaryrefslogtreecommitdiffstats
path: root/tests/test-vmstate.c
diff options
context:
space:
mode:
authorStephane Duverger2020-12-09 18:35:35 +0100
committerDavid Gibson2020-12-14 05:54:12 +0100
commitd55dfd446cd58b36f1b58d178039d7657a50e803 (patch)
tree980046959342b203531e46c18bb2a9a8aed57207 /tests/test-vmstate.c
parentppc/e500: Free irqs array to avoid memleak (diff)
downloadqemu-d55dfd446cd58b36f1b58d178039d7657a50e803.tar.gz
qemu-d55dfd446cd58b36f1b58d178039d7657a50e803.tar.xz
qemu-d55dfd446cd58b36f1b58d178039d7657a50e803.zip
ppc/translate: Use POWERPC_MMU_64 to detect 64-bit MMU models
The ppc_tr_init_disas_context() function currently checks whether the MMU is 64-bit by ANDing its model type with POWERPC_MMU_64B. This is wrong : POWERPC_MMU_64B isn't a mask, it is the generic MMU model for pre-PowerISA-2.03 64-bit CPUs (ie. PowerPC 970 in QEMU). Use POWERPC_MMU_64 instead of POWERPC_MMU_64B. This should fix a potential bug with some 32-bit CPUs for which 'need_access_type' was mis-computed because (POWERPC_MMU_32B & POWERPC_MMU_64B) happens to be equal to 1. The end result being a crash in ppc_hash32_direct_store() because the access type isn't set: cpu_abort(cs, "ERROR: instruction should not need " "address translation\n"); This doesn't change anything for 'lazy_tlb_flush' since POWERPC_MMU_32B is checked first. Fixes: 5f2a6254522b ("ppc: Don't set access_type on all load/stores on hash64") Signed-off-by: Stephane Duverger <stephane.duverger@free.fr> [groug: - extended patch to address another misuse of POWERPC_MMU_64B - updated title and changelog accordingly] Signed-off-by: Greg Kurz <groug@kaod.org> Message-Id: <20201209173536.1437351-2-groug@kaod.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'tests/test-vmstate.c')
0 files changed, 0 insertions, 0 deletions