On Wed, Nov 24, 2021 at 09:00:46AM -0300, Leandro Lupori wrote: > When updating the R bit of a PTE, the Hash64 MMU was using a wrong byte > offset, causing the first byte of the adjacent PTE to be corrupted. > This caused a panic when booting FreeBSD, using the Hash MMU. > > Signed-off-by: Leandro Lupori <leandro.lup...@eldorado.org.br>
Ouch, that's an embarrassing error :/. Reviewed-by: David Gibson <da...@gibson.dropbear.id.au> > --- > target/ppc/mmu-hash64.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/target/ppc/mmu-hash64.c b/target/ppc/mmu-hash64.c > index 19832c4b46..f165ac691a 100644 > --- a/target/ppc/mmu-hash64.c > +++ b/target/ppc/mmu-hash64.c > @@ -786,7 +786,7 @@ static void ppc_hash64_set_dsi(CPUState *cs, int mmu_idx, > uint64_t dar, uint64_t > > static void ppc_hash64_set_r(PowerPCCPU *cpu, hwaddr ptex, uint64_t pte1) > { > - hwaddr base, offset = ptex * HASH_PTE_SIZE_64 + 16; > + hwaddr base, offset = ptex * HASH_PTE_SIZE_64 + 14; > > if (cpu->vhyp) { > PPCVirtualHypervisorClass *vhc = -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
signature.asc
Description: PGP signature