- Make NKPML4E truly programmable and change the default from 1 PDP page to 16 PDP pages. This increases KVM from 512G to 8TB, which should be enough to accomodate a maximal 64TB configuration.
Note that e.g. 64TB of physical ram certainly requires more than one kernel PDP page, since the vm_page_array alone would require around 2TB, never mind everything else!
PDP entries in the PML4E (512 total @ 512GB per entry): 256 User space 112 (unused, avail for NKPML4E) 128 DMAP (64TB max physical memory) 16 KVM NKPML4E default (8TB) (recommend 64 max)
- Increase the DMAP from 64 PDP pages to 128 PDP pages, allowing support for up to 64TB of physical memory.
- Changes the meaning of KPML4I from being 'the index of the only PDP page in the PML4e' to 'the index of the first PDP page in the PML4e'. There are NKPML4E PDP pages starting at index KPML4I.
- NKPDPE can now exceed 512. This is calculated to be the maximmum number of PD pages needed for KVM, which is now (NKPML4E*NPDPEPG-1).
We now pre-allocate and populate only enough PD pages to accomodate the page tables we are pre-installing. Those, in turn, are calculated to be sufficient for bootstrapping mainly vm_page_array and a large initial set of pv_entry structures.
- Remove nkpt, it was not being used any more.
8ff9866bf1 kernel - Expand physical memory support to 64TB
sys/platform/pc64/include/pmap.h | 30 ++++--
sys/platform/pc64/include/vmparam.h | 15 +--
sys/platform/pc64/x86_64/mp_machdep.c | 1 -
sys/platform/pc64/x86_64/pmap.c | 170 +++++++++++++++++++++++-----------
4 files changed, 146 insertions(+), 70 deletions(-)