On Tue, 15 Sep 2026 07:05:46 GMT, Albert Mingkun Yang <[email protected]> wrote:
>> Gui Cao has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> RISC-V: Gate native AtomicAccess Zalasr dispatch on a post-validated flag
>
> src/hotspot/os_cpu/linux_riscv/riscv_hwprobe.cpp line 207:
>
>> 205: if (is_set(RISCV_HWPROBE_KEY_IMA_EXT_0, RISCV_HWPROBE_EXT_ZALASR)) {
>> 206: VM_Version::ext_Zalasr.enable_feature();
>> 207: }
>
> Preexisting: seems that a feature (risc-v extension) is always enabled if the
> underlying CPU supports, and the corresponding JVM flag can still be true
> when CPU doesn't support that feature.
>
> However, a more intuitive way of thinking is that a feature has two distinct
> dimensions: supported (whether CPU/OS support has been detected) and enabled
> (whether the JVM chooses to use it). A supported feature may remain disabled,
> but attempting to enable an unsupported feature should trigger a warning and
> leave it disabled, rather than override capability detection.
Yes, we can create a new JBS for this optimization later.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/32309#discussion_r4013030071