JDK-8297092 : [macos_aarch64] Add support for SHA feature detection
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 21
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: os_x
  • CPU: aarch64
  • Submitted: 2022-11-16
  • Updated: 2023-12-01
  • Resolved: 2023-01-17
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 21
21 b06Fixed
Related Reports
Relates :  
Relates :  
Description
xOn AArch64 MacOS, there are hardware supported features [2, 3] are not detected in `VM_Version::get_os_cpu_info()` [1].
They should be detected so that the hardware can be fully utilized.

[1] https://github.com/openjdk/jdk/blob/bd3acbea8c4ac0a9d3827a59bd736f0528b1b12b/src/hotspot/os_cpu/bsd_aarch64/vm_version_bsd_aarch64.cpp#L59.
[2] https://github.com/apple-oss-distributions/xnu/blob/5c2921b07a2480ab43ec66f5b9e41cb872bc554f/bsd/kern/kern_mib.c#L1076
[3] `sysctl -a` output:
hw.optional.arm.FEAT_AES: 1
hw.optional.arm.FEAT_BF16: 0
hw.optional.arm.FEAT_BTI: 0
hw.optional.arm.FEAT_CSV2: 1
hw.optional.arm.FEAT_CSV3: 1
hw.optional.arm.FEAT_DPB: 1
hw.optional.arm.FEAT_DPB2: 1
hw.optional.arm.FEAT_DotProd: 1
hw.optional.arm.FEAT_ECV: 1
hw.optional.arm.FEAT_FCMA: 1
hw.optional.arm.FEAT_FHM: 1
hw.optional.arm.FEAT_FP16: 1
hw.optional.arm.FEAT_FPAC: 0
hw.optional.arm.FEAT_FRINTTS: 1
hw.optional.arm.FEAT_FlagM: 1
hw.optional.arm.FEAT_FlagM2: 1
hw.optional.arm.FEAT_I8MM: 0
hw.optional.arm.FEAT_JSCVT: 1
hw.optional.arm.FEAT_LRCPC: 1
hw.optional.arm.FEAT_LRCPC2: 1
hw.optional.arm.FEAT_LSE: 1
hw.optional.arm.FEAT_LSE2: 1
hw.optional.arm.FEAT_PAuth: 1
hw.optional.arm.FEAT_PAuth2: 0
hw.optional.arm.FEAT_PMULL: 1
hw.optional.arm.FEAT_RDM: 1
hw.optional.arm.FEAT_SB: 1
hw.optional.arm.FEAT_SHA1: 1
hw.optional.arm.FEAT_SHA256: 1
hw.optional.arm.FEAT_SHA3: 1
hw.optional.arm.FEAT_SHA512: 1
hw.optional.arm.FEAT_SPECRES: 0
hw.optional.arm.FEAT_SSBS: 1
hw.optional.AdvSIMD: 1
hw.optional.AdvSIMD_HPFPCvt: 1
hw.optional.arm64: 1
hw.optional.armv8_1_atomics: 1
hw.optional.armv8_2_fhm: 1
hw.optional.armv8_2_sha3: 1
hw.optional.armv8_2_sha512: 1
hw.optional.armv8_3_compnum: 1
hw.optional.armv8_crc32: 1
hw.optional.armv8_gpi: 1
hw.optional.breakpoint: 6
hw.optional.floatingpoint: 1
hw.optional.neon: 1
hw.optional.neon_fp16: 1
hw.optional.neon_hpfp: 1
hw.optional.ucnormal_mem: 1
hw.optional.watchpoint: 4
Comments
Changeset: 240830df Author: Hao Sun <haosun@openjdk.org> Date: 2023-01-17 02:07:43 +0000 URL: https://git.openjdk.org/jdk/commit/240830df7eaa04e0056e9585ebdbf6b02e8b747c
17-01-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/11382 Date: 2022-11-28 02:19:47 +0000
28-11-2022