RFR: 8329031: CPUID feature detection for Advanced Performance Extensions (Intel® APX) [v2]

Vladimir Kozlov kvn at openjdk.org
Thu Jun 6 20:31:19 UTC 2024


On Thu, 6 Jun 2024 19:31:03 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:

>> Summary of changes include with the patch:-
>> 
>> 1) CPUID based feature detection check for Intel APX extension (https://www.intel.com/content/www/us/en/developer/articles/technical/advanced-performance-extensions-apx.html)
>> 2) Validation during VM initialization for extended GPRs state save / restoration by OS across context switches of java application threads executing JIT compiled code with new APX ISA.
>> 
>> Kindly review and share your feedback.
>> 
>> Best Regards,
>> Jatin
>
> Jatin Bhateja has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Review comments resolutions.

Few comments

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

> 1050: 
> 1051:   // Currently APX support is only enabled for targets supporting AVX512VL feature.
> 1052:   if (UseAPX && (!supports_apx_f() || !supports_avx512vl())) {

This code should be after UseAVX checks.

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

> 1060:   if (UseAVX < 2) {
> 1061:     _features &= ~CPU_AVX2;
> 1062:     _features &= ~CPU_AVX_IFMA;

Since value of UseAVX affects avx512vl it should affect UseAPX/CPU_APX_F too.

src/hotspot/cpu/x86/vm_version_x86.hpp line 337:

> 335:   static address   _cpuinfo_cont_addr;     // address of instruction after the one which causes SEGV
> 336:   static address   _cpuinfo_segv_addr_apx; // address of instruction which causes APX specific SEGV
> 337:   static address   _cpuinfo_cont_addr_apx; // address of instruction which causes APX specific SEGV

Duplicated comment. It should continuation address comment.

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

PR Review: https://git.openjdk.org/jdk/pull/18562#pullrequestreview-2103120144
PR Review Comment: https://git.openjdk.org/jdk/pull/18562#discussion_r1630190641
PR Review Comment: https://git.openjdk.org/jdk/pull/18562#discussion_r1630185873
PR Review Comment: https://git.openjdk.org/jdk/pull/18562#discussion_r1630187773


More information about the hotspot-compiler-dev mailing list