Skip to content

Conversation

@copybara-service
Copy link

Detect if 5-level paging is actually enabled on the host.

The CPUID can indicate support for 5-level paging (57 virtual address bits),
but the kernel might not have it enabled. This change adds a check using
mmap to see if addresses above 2^48 are usable. If not,
VirtualAddressBits is capped at 48, even if CPUID suggests 57.

Fixes #12308

@copybara-service copybara-service bot added the exported Issue was exported automatically label Nov 17, 2025
@copybara-service copybara-service bot force-pushed the test/cl832518109 branch 2 times, most recently from 19ca8e6 to eb29bb0 Compare November 17, 2025 19:47
@copybara-service copybara-service bot force-pushed the test/cl832518109 branch 3 times, most recently from af5adfa to e99487f Compare November 17, 2025 22:51
The CPUID can indicate support for 5-level paging (57 virtual address bits),
 but the kernel might not have it enabled. This change adds a check using
`mmap` to see if addresses above 2^48 are usable. If not,
`VirtualAddressBits` is capped at 48, even if CPUID suggests 57.

Fixes #12308

PiperOrigin-RevId: 832518109
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

exported Issue was exported automatically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5-level paging support broken on kernels without it enabled

1 participant