RFR: 8367780: Enable UseAPX on Intel CPUs only when both APX_F and APX_NCI_NDD_NF cpuid features are present [v4]
Volodymyr Paprotski
vpaprotski at openjdk.org
Thu Sep 18 21:57:59 UTC 2025
On Wed, 17 Sep 2025 17:54:49 GMT, Srinivas Vamsi Parasa <sparasa at openjdk.org> wrote:
>> The goal of this PR is to enable APX on Intel CPUs (i.e. enable UseAPX) only when both the APX_F and APX_NCI_NDD_NF cpuid feature flags are present.
>>
>> As per the latest update to the Intel APX specification (https://www.intel.com/content/www/us/en/content-details/861610/intel-advanced-performance-extensions-intel-apx-architecture-specification.html ), when APX_F is set, processors also provide CPUID leaf 0x29 (APX Advanced Performance Extensions Leaf). Any Intel processor that enumerates APX_F also enumerates APX_NCI_NDD_NF.
>>
>> This PR enhances the HotSpot x86 CPU feature detection to recognize the APX_NCI_NDD_NF sub-feature of Intel APX and update the enabling logic for UseAPX VM flag.
>
> Srinivas Vamsi Parasa has updated the pull request incrementally with two additional commits since the last revision:
>
> - Update CPUInfoTest.java
> - Remove APX_NCI_NDD_NF as an explicit feature
Thanks for answering my questions.. things we checked:
- double-checked reg parameter values of cpuid against the spec
- double-checked endianness of bitset variables in C grammar
- double-checked how offset to the field std_cpuid29_ebx is computed
Change looks good to me
src/hotspot/cpu/x86/vm_version_x86.cpp line 2928:
> 2926: if (sefsl1_cpuid7_edx.bits.apx_f != 0 &&
> 2927: xem_xcr0_eax.bits.apx_f != 0 &&
> 2928: std_cpuid29_ebx.bits.apx_nci_ndd_nf != 0) {
was confused why the previous implementation was 'wrong'.. Please clarify that this was triggered "because" of the update to the spec (in the PR description).
-------------
Marked as reviewed by vpaprotski (Committer).
PR Review: https://git.openjdk.org/jdk/pull/27320#pullrequestreview-3242099089
PR Review Comment: https://git.openjdk.org/jdk/pull/27320#discussion_r2361188118
More information about the graal-dev
mailing list