From: dv Date: Thu, 8 Aug 2024 15:57:22 +0000 (+0000) Subject: Start wire_count for EPT pde pages at 1. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=7287160d5d072b92cf7a8e3e07a4a6af3565955f;p=openbsd Start wire_count for EPT pde pages at 1. Corrects an off-by-one error that results in EPT pte's not being removed properly. ok mlarkin@ --- diff --git a/sys/arch/amd64/amd64/pmap.c b/sys/arch/amd64/amd64/pmap.c index f8c4acea310..413a69c52b2 100644 --- a/sys/arch/amd64/amd64/pmap.c +++ b/sys/arch/amd64/amd64/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.170 2024/07/21 19:41:31 bluhm Exp $ */ +/* $OpenBSD: pmap.c,v 1.171 2024/08/08 15:57:22 dv Exp $ */ /* $NetBSD: pmap.c,v 1.3 2003/05/08 18:13:13 thorpej Exp $ */ /* @@ -2655,6 +2655,7 @@ pmap_enter_ept(struct pmap *pmap, paddr_t gpa, paddr_t hpa, vm_prot_t prot) } atomic_clearbits_int(&ptp->pg_flags, PG_BUSY); + ptp->wire_count = 1; pptp->wire_count++; npa = VM_PAGE_TO_PHYS(ptp);