git: e173855c9f6b - main - i386: Avoid registering overlapping vm_phys_seg entries

From: Mark Johnston <markj_at_FreeBSD.org>
Date: Wed, 26 Mar 2025 12:01:07 UTC
The branch main has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=e173855c9f6b3b87c975418d0acf1c22ac4f1626

commit e173855c9f6b3b87c975418d0acf1c22ac4f1626
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2025-03-26 09:34:53 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2025-03-26 09:54:39 +0000

    i386: Avoid registering overlapping vm_phys_seg entries
    
    The entry added in pmap_bootstrap() is guaranteed to be covered by that
    added in pmap_cold().  This apparently went unnoticed until commit
    8a14ddcc1d8e ("vm_phys: Check for overlap when adding a segment").
    
    PR:             285415
    Tested by:      dim
    MFC after:      2 weeks
---
 sys/i386/i386/pmap.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c
index 57ba48d399c3..302e493e44d1 100644
--- a/sys/i386/i386/pmap.c
+++ b/sys/i386/i386/pmap.c
@@ -614,15 +614,6 @@ __CONCAT(PMTYPE, bootstrap)(vm_paddr_t firstaddr)
 
 	res = atop(firstaddr - (vm_paddr_t)KERNLOAD);
 
-	/*
-	 * Add a physical memory segment (vm_phys_seg) corresponding to the
-	 * preallocated kernel page table pages so that vm_page structures
-	 * representing these pages will be created.  The vm_page structures
-	 * are required for promotion of the corresponding kernel virtual
-	 * addresses to superpage mappings.
-	 */
-	vm_phys_early_add_seg(KPTphys, KPTphys + ptoa(nkpt));
-
 	/*
 	 * Initialize the first available kernel virtual address.
 	 * However, using "firstaddr" may waste a few pages of the