Messages in this thread | | | Date | Wed, 21 Feb 2024 14:51:46 +0000 | From | Conor Dooley <> | Subject | Re: [PATCH v2] riscv: hwprobe: export largest userspace address |
| |
On Tue, Feb 20, 2024 at 12:09:46PM +0100, Clément Léger wrote: > Some userspace applications (OpenJDK for instance) uses the free MSBs > in pointers to insert additional information for their own logic and > need to get this information from somewhere. Currently they rely on > parsing /proc/cpuinfo "mmu=svxx" string to obtain the current value of > virtual address used bits [1]. Since this reflect the raw MMU mode > supported, it might differ from the logical one used internally. > Exporting the maximum mmappable address through hwprobe will allow a > more stable interface to be used. For that purpose, add a new hwprobe > key named RISCV_HWPROBE_MAX_KEY which will export the maximum mmappable > userspace address. > > Link: https://github.com/openjdk/jdk/blob/master/src/hotspot/os_cpu/linux_riscv/vm_version_linux_riscv.cpp#L171 [1] > Signed-off-by: Clément Léger <cleger@rivosinc.com>
Doesn't build for nommu: https://patchwork.kernel.org/project/linux-riscv/patch/20240220110950.871307-1-cleger@rivosinc.com/
Cheers, Conor. [unhandled content-type:application/pgp-signature] | |