Skip to content

Limit Linux RISC-V address bits#860

Open
Xeonacid wants to merge 1 commit into
microsoft:mainfrom
Xeonacid:fix-linux-riscv-address-bits
Open

Limit Linux RISC-V address bits#860
Xeonacid wants to merge 1 commit into
microsoft:mainfrom
Xeonacid:fix-linux-riscv-address-bits

Conversation

@Xeonacid

Copy link
Copy Markdown

Linux RISC-V systems may run with an Sv39 user address space. The generic AAL default reports 48 address bits for 64-bit targets, which makes the default pagemap cover a much larger range than the process can reserve on those systems.

On an Sv39 Linux host, allocator initialisation tried to reserve a 256 GiB pagemap and mmap returned ENOMEM. Use the same conservative 38-bit RISC-V limit that the FreeBSD PAL already uses so the Linux PAL sizes its pagemap for the usable lower address range.

Linux RISC-V systems may run with an Sv39 user address space. The generic AAL default reports 48 address bits for 64-bit targets, which makes the default pagemap cover a much larger range than the process can reserve on those systems.

On an Sv39 Linux host, allocator initialisation tried to reserve a 256 GiB pagemap and mmap returned ENOMEM. Use the same conservative 38-bit RISC-V limit that the FreeBSD PAL already uses so the Linux PAL sizes its pagemap for the usable lower address range.
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