Repository navigation
Conversation
| bool sha; | ||
| bool rng; | ||
| bool ace; | ||
| bool padlock_ace; |
There was a problem hiding this comment.
struct cpuinfo_x86_isa already had a legacy bool ace field for VIA PadLock cryptography (if (vendor == cpuinfo_vendor_via)), which collided with adding bool ace for x86 AI Compute Extensions. Removed padlock_ace so VIA PadLock's ace field is untouched, and named the new internal struct member ace_v1 (matching avx10_1 / avx10_2) while keeping cpuinfo_has_x86_ace() unchanged.
|
please add how you arrive at these values I guess. or if it tested on some hardware then add details |
|
Updated the PR description and inline code comments with the exact CPUID and |
| * Reference: AI Compute Extensions (ACE) Specification v1.15, Section 3.2: | ||
| * https://x86ecosystem.org/wp-content/uploads/2026/06/ACE_v1_Specification_public_1_15.pdf | ||
| */ | ||
| static inline bool cpuinfo_has_x86_ace(void) { |
There was a problem hiding this comment.
AI review: Naming the field ace_v1 avoids the clash inside the struct, but the public function is still cpuinfo_has_x86_ace(). Every other cpuinfo_has_x86_X() returns cpuinfo_isa.X, and cpuinfo_isa.ace is already VIA PadLock ACE. Linux also calls the PadLock flag ace in /proc/cpuinfo. So readers will expect this function to return the PadLock bit. The header says the struct is not stable API but the functions are, so the function name is the part that is hard to change later. Could you call it cpuinfo_has_x86_ace_v1(), like cpuinfo_has_x86_avx10_1(), and print ACE_V1 in isa-info? A one-line comment on the field saying it is AI Compute Extensions, not PadLock, would also help.
| * Reference: AI Compute Extensions (ACE) Specification v1.15, Section 3.2: | ||
| * https://x86ecosystem.org/wp-content/uploads/2026/06/ACE_v1_Specification_public_1_15.pdf | ||
| */ | ||
| static inline bool cpuinfo_has_x86_ace(void) { |
There was a problem hiding this comment.
AI review: Naming the field ace_v1 avoids the clash inside the struct, but the public function is still cpuinfo_has_x86_ace(). Every other cpuinfo_has_x86_X() returns cpuinfo_isa.X, and cpuinfo_isa.ace is already VIA PadLock ACE. Linux also calls the PadLock flag ace in /proc/cpuinfo. So readers will expect this function to return the PadLock bit. The header says the struct is not stable API but the functions are, so the function name is the part that is hard to change later. Could you call it cpuinfo_has_x86_ace_v1(), like cpuinfo_has_x86_avx10_1(), and print ACE_V1 in isa-info? A one-line comment on the field saying it is AI Compute Extensions, not PadLock, would also help.
There was a problem hiding this comment.
Done — rebased onto main, renamed the public accessor to cpuinfo_has_x86_ace_v1() (matching cpuinfo_has_x86_avx10_1()), updated isa-info to print ACE_V1, and added an inline comment on cpuinfo_x86_isa.ace_v1 noting that it is x86 AI Compute Extensions v1 rather than VIA PadLock ACE.
Detect x86 AI Compute Extensions (ACE v1) in cpuinfo_x86_detect_isa, expose cpuinfo_has_x86_ace_v1(), and print ACE_V1 support in isa-info. Use ace_v1 in struct cpuinfo_x86_isa so the existing VIA PadLock ace field remains untouched. Per Section 3.2 (Detection Algorithm) of the AI Compute Extensions (ACE) Specification v1.15: https://x86ecosystem.org/wp-content/uploads/2026/06/ACE_v1_Specification_public_1_15.pdf 1. OS XSAVE state enabled (CR4.OSXSAVE = 1, CPUID.01H:ECX[27:26] = 11b): - AVX-512 state: XCR0[7:5] = 111b and XCR0[2:1] = 11b (0x000000E6) - ACE state: XCR0[20,18:17] = 111b (0x00160000: TILECFG bit 17, TILEDATA bit 18, and SCALEDATA/BSR bit 20) 2. CPUID feature flags: - (AVX10.1 && AVX10_V1_AUX) || AVX10.2, with AVX10_V1_AUX in CPUID.(EAX=24H, ECX=01H):ECX[2] - AVX10_V2_AUX: CPUID.(EAX=24H, ECX=01H):ECX[3] - ACE: CPUID.(EAX=07H, ECX=01H):ECX[11] - MAX_PALETTE >= 2: CPUID.(EAX=1DH, ECX=00H):EAX >= 2 - ACE_VSN >= 1: CPUID.(EAX=1DH, ECX=02H):EAX[7:0] >= 1 Verified under Intel SDE 10.13.1: sde64 -spr -- ./isa-info # ACE_V1: no sde64 -gnr -- ./isa-info # ACE_V1: no sde64 -dmr -- ./isa-info # ACE_V1: no sde64 -future-ag -- ./isa-info # ACE_V1: yes sde64 -future-ag -xsave_default 0x600e7 -- ./isa-info # ACE_V1: no sde64 -future-ag -xsave_default 0x1600e7 -- ./isa-info # ACE_V1: yes
Detect x86 AI Compute Extensions (ACE v1) in
cpuinfo_x86_detect_isa, exposecpuinfo_has_x86_ace_v1(), and printACE_V1support inisa-info. Useace_v1instruct cpuinfo_x86_isa(with an inline comment distinguishing it from VIA PadLock) so the existing VIA PadLockacefield remains untouched.Specification Reference
Per Section 3.2 (Detection Algorithm), Section 15.4.1, and Appendix A of the x86 Ecosystem Advisory Group's AI Compute Extensions (ACE) Specification v1.15:
CR4.OSXSAVE = 1,CPUID.01H:ECX[27:26] = 0b11):XCR0[7:5] = 0b111andXCR0[2:1] = 0b11(0x000000E6,avx512_regs)XCR0[20,18:17] = 0b111(0x00160000,ace_regs—TILECFGbit 17,TILEDATAbit 18, and 128-byteSCALEDATA/BSRbit 20)(AVX10.1 && AVX10_V1_AUX) || AVX10.2, whereAVX10_V1_AUXisCPUID.(EAX=24H, ECX=01H):ECX[2]AVX10_V2_AUX:CPUID.(EAX=24H, ECX=01H):ECX[3]ACE:CPUID.(EAX=07H, ECX=01H):ECX[11]MAX_PALETTE >= 2:CPUID.(EAX=1DH, ECX=00H):EAX >= 2ACE_VSN >= 1:CPUID.(EAX=1DH, ECX=02H):EAX[7:0] >= 1Testing
Verified under Intel SDE 10.13.1: