RFR: 8376164: Optimize AES/ECB/PKCS5Padding implementation using full-message intrinsic stub and parallel RoundKey addition [v5]

Marc Chevalier mchevalier at openjdk.org
Thu Feb 26 08:09:49 UTC 2026


On Thu, 26 Feb 2026 06:59:34 GMT, xinyangwu <duke at openjdk.org> wrote:

>>> Not a review! I've seen the `hotspot-compiler` label and I've just run some testing. I've got a failure on the test `compiler/codegen/aes/TestAESMain.java` using flags `-XX:UseAVX=3 -XX:+UnlockDiagnosticVMOptions -XX:+UseKNLSetting` on a machine with an Intel Xeon Platinum 8358 Processor.
>> 
>> Thank you for your testing @marc-chevalier.  Interesting, as I wasn't able to reproduce this issue using the same options on a AMD EPYC 9J14 96-core processor.
>
>> Not a review! I've seen the `hotspot-compiler` label and I've just run some testing. I've got a failure on the test `compiler/codegen/aes/TestAESMain.java` using flags `-XX:UseAVX=3 -XX:+UnlockDiagnosticVMOptions -XX:+UseKNLSetting` on a machine with an Intel Xeon Platinum 8358 Processor.
> 
> Thanks a lot for testing and reporting @marc-chevalier. 
> 
> I noticed that `-XX:+UseKNLSetting` clears several Intel AVX-512 features (AVX512_VAES, AVX512BW, AVX512VL, etc.) in `vm_version_x86.cpp`, which changes the AES intrinsic path. Unfortunately, I don’t currently have access to an Intel AVX-512 machine to reproduce this directly.
> 
> I tried to simulate a similar setup on an AMD EPYC 9755 (AVX-512 capable) machine by changing `is_intel()` to `is_amd()`, but I wasn’t able to reproduce the failure.
> 
> There may be some differences between Intel and AMD AVX-512 behavior, or my simulation might not be fully equivalent to `UseKNLSetting` on Intel.
> 
> I’ll keep investigating this and try to reproduce it on an Intel system if possible. Thanks again for the detailed report!

As @reverse-kong noticed, I think `UseKNLSetting` is used only for
https://github.com/openjdk/jdk/blob/fd48f68a2cc69a0cccbc2503f29aad2de19ec098/src/hotspot/cpu/x86/vm_version_x86.hpp#L838
Does the AMD EPYC 9J14 is recognized as a Knights one here?

@reverse-kong Could using [Intel SDE](https://www.intel.com/content/www/us/en/developer/articles/tool/software-development-emulator.html) help with that?

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

PR Comment: https://git.openjdk.org/jdk/pull/29385#issuecomment-3964846702



More information about the security-dev mailing list