RFR: 8316859: RISC-V: Disable detection of V through HWCAP
Robbin Ehn
rehn at openjdk.org
Mon Sep 25 08:53:16 UTC 2023
On Mon, 25 Sep 2023 08:38:03 GMT, Ludovic Henry <luhenry at openjdk.org> wrote:
> Some dev boards only support RVV version 0.7, while the OpenJDK only supports RVV version 1.0. These two versions are not compatible with each other. Given the V bit is set through HWCAP on some custom kernels, regardless of the version, it can lead to generating V instructions on boards that don't support RVV version 1.0 (ex: Sipeed LicheePi), leading to a SIGILL.
>
> That is an acceptable workaround as only Linux Kernel v6.5+ supports V, and that version already support hwprobe anyway
V should be disabled in vcsr pre-6.5. Even if you manage somehow to enabled it you still need all registers saved and restored on a context switch, e.i. kernel must be aware of a user space program using V.
As you say, an aware kernel also supports hw probe, sensible, thanks!
-------------
Marked as reviewed by rehn (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/15898#pullrequestreview-1641647058
More information about the hotspot-runtime-dev
mailing list