aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc/spapr_softmmu.c
diff options
context:
space:
mode:
authorLeandro Lupori <leandro.lupori@eldorado.org.br>2021-11-29 15:57:51 -0300
committerCédric Le Goater <clg@kaod.org>2021-11-29 21:00:08 +0100
commit7bf00dfb51566070960e0b7977e41abba96c130e (patch)
tree5bf295d2edf52f01636b3b2b230dec199362f4df /hw/ppc/spapr_softmmu.c
parenta0fd8a5492240379a07c0b39c8dae3b8341b458f (diff)
target/ppc: fix Hash64 MMU update of PTE bit R
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. Fixes: a2dd4e83e76b ("ppc/hash64: Rework R and C bit updates") Signed-off-by: Leandro Lupori <leandro.lupori@eldorado.org.br> Signed-off-by: Cédric Le Goater <clg@kaod.org>
Diffstat (limited to 'hw/ppc/spapr_softmmu.c')
-rw-r--r--hw/ppc/spapr_softmmu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/ppc/spapr_softmmu.c b/hw/ppc/spapr_softmmu.c
index f8924270ef..4ee03c83e4 100644
--- a/hw/ppc/spapr_softmmu.c
+++ b/hw/ppc/spapr_softmmu.c
@@ -426,7 +426,7 @@ static void new_hpte_store(void *htab, uint64_t pteg, int slot,
addr += slot * HASH_PTE_SIZE_64;
stq_p(addr, pte0);
- stq_p(addr + HASH_PTE_SIZE_64 / 2, pte1);
+ stq_p(addr + HPTE64_DW1, pte1);
}
static int rehash_hpte(PowerPCCPU *cpu,