From c3092a9c61c7e791897b04ebd56a1b198db064f9 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Wed, 19 Nov 2025 15:21:29 -0500 Subject: kern/amd64: mp: Don't return on present entry Signed-off-by: Ian Moffett --- sys/arch/amd64/cpu/mmu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sys') diff --git a/sys/arch/amd64/cpu/mmu.c b/sys/arch/amd64/cpu/mmu.c index 48c096d..b709ee1 100644 --- a/sys/arch/amd64/cpu/mmu.c +++ b/sys/arch/amd64/cpu/mmu.c @@ -143,7 +143,9 @@ pmap_get_level(struct mmu_vas *vas, uintptr_t va, bool en_alloc, pagelevel_t lvl while ((curlvl--) > lvl) { index = pmap_get_index(va, curlvl); if (ISSET(pmap[index], PTE_P)) { - return PHYS_TO_VIRT(pmap[index] & PTE_ADDR_MASK); + pmap = PHYS_TO_VIRT(pmap[index] & PTE_ADDR_MASK); + --curlvl; + continue; } if (!en_alloc) { -- cgit v1.2.3