Skip to content

Conversation

@apateriy-qcom
Copy link

Lower-end arm64 systems typically do not benefit from a 48/52-bit VA space, while they do benefit from smaller page tables and reduced TLB pressure. Make 39-bit the default for 4K-page builds (3-level tables).

This change does not affect 64K-page builds (which retain 48/52-bit VA).

Background:

  • With 4K pages, arm64 supports 39-bit (3-level) or 48-bit (4-level) VAs.
  • 52-bit VAs are only available with 64K pages and ARMv8.2-LVA, and kernels must be able to fall back to 48-bit at boot.

Lower-end arm64 systems typically do not benefit from a 48/52-bit VA
space, while they do benefit from smaller page tables and reduced TLB
pressure. Make 39-bit the default for 4K-page builds (3-level tables).

This change does not affect 64K-page builds (which retain 48/52-bit VA).

Background:
- With 4K pages, arm64 supports 39-bit (3-level) or 48-bit (4-level) VAs.
- 52-bit VAs are only available with 64K pages and ARMv8.2-LVA, and
  kernels must be able to fall back to 48-bit at boot.

Signed-off-by: Anurag Pateriya <apateriy@qti.qualcomm.com>
@qcomlnxci qcomlnxci requested a review from a team January 23, 2026 12:34
choice
prompt "Virtual address space size"
# Prefer smaller VA (3-level tables) on 4K-page builds
default ARM64_VA_BITS_39 if PAGE_SIZE_4KB
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's update qcom.config instead of changing upstream code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants