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

Block CPU VAs with 48th bit set on aarch64 #801

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vihangm
Copy link

@vihangm vihangm commented Jan 30, 2025

aarch64 allows CPU VAs to be from 0x0000_0000_0000 to 0xFFFF_FFFF_FFFF and additionally doesn't want the addresses to be canonized like they are in x86_64.
Since SVM relies on CPU and GPU addrs to line up, and mmap on aarch64 usually gives you an addr with the 48th bit set, this causes SVM to fail.
Reserving the addrs between 0x8000_0000_0000 and 0xFFFF_FFFF_FFFF is a trick to ensure that future mmap calls give you addrs that line up with what one would get on a x86_64 system and makes the library work on aarch64 without any changes to canonization.

Signed-off-by: Vihang Mehta <vihang@gimletlabs.ai>
@vihangm vihangm changed the title Update canonize to fix aarch64 bugs Block CPU VAs with 48th bit set on aarch64 Feb 27, 2025
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.

1 participant