Linux kernel page table creation for X86_64 system

From: BOTONG OU
Date: Tue Dec 21 2021 - 15:05:47 EST


Hi,
I am recently learning how the Linux kernel page table is created for
the X86_64 system. Here are some questions I have:
1. When the actual initial kernel page table is created which is
init_top_pgt, there are some entries of it that are initialized. As
far as I know, kernel mapping area (map to kernel image), direct
mapping (0-1GB), vmemmap, ioremap, and vmalloc area in the initial
kernel page table are initialized and mapped to physical memory. Is
this correct? Is there any other area I am missing?
2. In order to handle the 128TB kernel physical memory, more page
tables have to be created to map to the physical memory. However, I
can't find in the kernel where are the extra page tables being
created. Does the kernel create the extra page tables using, for
example, pgd_alloc interface? or other interfaces.
Thanks for answering my questions.

Best,
Botong