The branch stable/13 has been updated by luporl: URL: https://cgit.FreeBSD.org/src/commit/?id=019cdd20bbd3bd5d73444e0c0311bfbe2defe3c3
commit 019cdd20bbd3bd5d73444e0c0311bfbe2defe3c3 Author: Leandro Lupori <lup...@freebsd.org> AuthorDate: 2021-04-06 11:31:44 +0000 Commit: Leandro Lupori <lup...@freebsd.org> CommitDate: 2021-04-22 14:31:31 +0000 powerpc64: add missing TLB invalidations to radix Radix MMU code was missing TLB invalidations when some Level 3 PDEs were modified. This caused TLB multi-hit machine check interrupts when superpages were enabled. Reviewed by: jhibbits Sponsored by: Eldorado Research Institute (eldorado.org.br) Differential Revision: https://reviews.freebsd.org/D29511 (cherry picked from commit 28d14569c8735060d0a1646a3422562c0741ac44) --- sys/powerpc/aim/mmu_radix.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/powerpc/aim/mmu_radix.c b/sys/powerpc/aim/mmu_radix.c index 2373425afd30..0f5aa2ec151e 100644 --- a/sys/powerpc/aim/mmu_radix.c +++ b/sys/powerpc/aim/mmu_radix.c @@ -3185,6 +3185,7 @@ pmap_enter_l3e(pmap_t pmap, vm_offset_t va, pml3_entry_t newpde, u_int flags, * a reserved PT page could be freed. */ (void)pmap_remove_l3e(pmap, l3e, va, &free, lockp); + pmap_invalidate_l3e_page(pmap, va, oldl3e); } else { if (pmap_remove_ptes(pmap, va, va + L3_PAGE_SIZE, l3e, &free, lockp)) @@ -3243,6 +3244,7 @@ pmap_enter_l3e(pmap_t pmap, vm_offset_t va, pml3_entry_t newpde, u_int flags, * be any lingering 4KB page mappings in the TLB.) */ pte_store(l3e, newpde); + ptesync(); atomic_add_long(&pmap_l3e_mappings, 1); CTR2(KTR_PMAP, "pmap_enter_pde: success for va %#lx" @@ -4944,7 +4946,7 @@ pmap_demote_l3e_locked(pmap_t pmap, pml3_entry_t *l3e, vm_offset_t va, * the read above and the store below. */ pde_store(l3e, mptepa); - ptesync(); + pmap_invalidate_l3e_page(pmap, trunc_2mpage(va), oldpde); /* * Demote the PV entry. */ @@ -5225,6 +5227,7 @@ mmu_radix_remove(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) */ if (sva + L3_PAGE_SIZE == va_next && eva >= va_next) { pmap_remove_l3e(pmap, l3e, sva, &free, &lock); + anyvalid = true; continue; } else if (!pmap_demote_l3e_locked(pmap, l3e, sva, &lock)) { _______________________________________________ dev-commits-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all To unsubscribe, send any mail to "dev-commits-src-all-unsubscr...@freebsd.org"