RFR: 8309258: RISC-V: Add riscv_hwprobe syscall [v2]
Fei Yang
fyang at openjdk.org
Wed Jun 14 11:28:57 UTC 2023
On Wed, 14 Jun 2023 09:01:17 GMT, Robbin Ehn <rehn at openjdk.org> wrote:
>> src/hotspot/os_cpu/linux_riscv/vm_version_linux_riscv.cpp line 212:
>>
>>> 210: }
>>> 211:
>>> 212: void VM_Version::rivos_features() {
>>
>> It looks to me not safe to only check vendor ID when enabling those features. It's possible for a vendor to have different CPU models equipped different RISC-V extensions. So it's more reasonable to add check for `marchid` & `mimpid` here which helps distinguish Architecture ID & Implementaion ID of the CPU.
>
> Yes, correct.
> The idea was that the vendor can add these checks in it's specific path.
> For us enabling these basic features are fine, since they are common to march/mimpid, hence we do not yet need to check these.
>
> Hope that explains it.
I see. Maybe leave a code comment for your case?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14445#discussion_r1229440425
More information about the hotspot-dev
mailing list