How does Linux support more than 512 GB of virtual address range in x86-64?

The user virtual address space for x86-64 with Linux is 47 bits. Which essentially means that Linux can display a process with a virtual address range of around 128 TB.

However, what confuses me is that the x86-64 architecture supports ISA specific 4-level hierarchical page table (arranged as a radix-tree) for each process. The page table root can only display up to 512 GB of contiguous virtual address space. So, how can Linux support more than 512 GB of virtual address range? Does it use multiple page tables for each process? If yes, then for the process, why should CR3 (register x86-64 contain the address of the base page table) for any given process? Did I miss something?

+5
source share
2 answers

512 . , Linux 512 ? ? , , CR3 ( x86-64 ) ? - ?

, " ", x86-64 :

  • - . 512 8- (PTE), 4 KiB, PT 512 * 4 KiB = 2 MiB ( 2 MiB, ).
  • - , PT, 512 8- (PDE), ; PD 512 * 2 MiB = 1 GiB ( 1 GiB, PT).
  • - PD, 512 8- (PDPTE), PD; PDPTE 512 * 1 Gib = 512 GiB .
  • PML4, , , 512 8- (PML4E), PDPT; PML4 512 * 512 GiB = 256 TiB .

Linux, , , ( -128 TiB 0 - 0xFFFF800000000000 0xFFFFFFFFFFFFFFFF) , ( 0 128 TiB - 0x0000000000000000 0x00007FFFFFFFFFFF) - . , Linux 512- 512 , ; " PML4". , - , , , 2 MiB, , - 4 KiB, - -, , .

+7

, , . , 4 .

, () , , .

, , , 2 48 . , , .

0

All Articles