Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

only 39bit of virtual address space available #6261

Closed
theofficialgman opened this issue Jul 8, 2024 · 4 comments
Closed

only 39bit of virtual address space available #6261

theofficialgman opened this issue Jul 8, 2024 · 4 comments

Comments

@theofficialgman
Copy link

Describe the bug

using 39bits of virtual address space causes issues primarily on emulation of x64 software (such as wine with box64) and it would be better to build the kernel with 48bits of virtual address space

this is a common usecase as evident by the 16K+ installs of Wine (x64) via pi-apps https://pi-apps.io/wiki/getting-started/apps-list/#wine-(x64) and ~44K installs of Box64 via pi-apps https://pi-apps.io/wiki/getting-started/apps-list/#box64

Steps to reproduce the behaviour

boot linux. observe that it uses the (default) 39bits address space on 4K pagesize and 47bits address space on 16K pagesize

Device (s)

Raspberry Pi Zero 2 W, Raspberry Pi 3 Mod. A+, Raspberry Pi 3 Mod. B, Raspberry Pi 3 Mod. B+, Raspberry Pi 4 Mod. B, Raspberry Pi 400, Raspberry Pi 5, Raspberry Pi CM3, Raspberry Pi CM3 Lite, Raspberry Pi CM3+, Raspberry Pi CM3+ Lite, Raspberry Pi CM4, Raspberry Pi CM4 Lite

System

all ARM64 kernel releases (both 4K and 16K pagesizes)

Logs

No response

Additional context

Solution:
the following args (though all are not explicitly necessary since they are dependencies of one another) achieve 48bits of virtual address space on ARM64

# enable 48bits virtual address space size
CONFIG_ARM64_VA_BITS_48=y
# set default virtual address space size to 48bits (default when CONFIG_ARM64_VA_BITS_48=y)
CONFIG_ARM64_VA_BITS=48
@pelwell
Copy link
Contributor

pelwell commented Jul 9, 2024

Duplicate of #4375?

@theofficialgman
Copy link
Author

Duplicate of #4375?

as correctly described here #4375 (comment) , the page table size is a function of the virtual address space, not the other way around. so the other issue is asking for the same thing but (the title is) worded the wrong way.

@theofficialgman
Copy link
Author

52bits (with a runtime fallback to 48bits on hardware that doesn't support it) is the default on all arm64 kernels as of kernel 6.9

@theofficialgman
Copy link
Author

theofficialgman commented Jul 22, 2024

this is a common usecase as evident by the 16K+ installs of Wine (x64) via pi-apps https://pi-apps.io/wiki/getting-started/apps-list/#wine-(x64) and ~44K installs of Box64 via pi-apps https://pi-apps.io/wiki/getting-started/apps-list/#box64

the particular wine issue has been resolved via a custom patch Pi-Apps-Coders/files@a8609ce

closing as my primary reason has been resolved

@theofficialgman theofficialgman closed this as not planned Won't fix, can't repro, duplicate, stale Jul 23, 2024
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

No branches or pull requests

2 participants