compute-runtime icon indicating copy to clipboard operation
compute-runtime copied to clipboard

Block CPU VAs with 48th bit set on aarch64

Open vihangm opened this issue 11 months ago • 0 comments

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.

vihangm avatar Jan 30 '25 03:01 vihangm