RFR: 8367780: Enable UseAPX on Intel CPUs only when both APX_F and APX_NCI_NDD_NF cpuid features are present [v3]

Sandhya Viswanathan sviswanathan at openjdk.org
Wed Sep 17 00:28:50 UTC 2025


On Tue, 16 Sep 2025 19:21:28 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 one additional commit since the last revision:
> 
>   update KNL check

src/hotspot/cpu/x86/vm_version_x86.cpp line 1083:

> 1081:   if (!UseAPX) {
> 1082:     _features.clear_feature(CPU_APX_F);
> 1083:     _features.clear_feature(CPU_APX_NCI_NDD_NF);

We don't need separate CPU_APX_NCI_NDD_NF feature and the related changes as CPU_APX_F feature is set only when both bits (sefsl1_cpuid7_edx.bits.apx_f and std_cpuid29_ebx.bits.apx_nci_ndd_nf) are set.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/27320#discussion_r2353925684


More information about the graal-dev mailing list