]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
cpu_map: Add CPUID features for AMX instructions
authorJiri Denemark <jdenemar@redhat.com>
Thu, 7 May 2026 09:46:48 +0000 (11:46 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Wed, 20 May 2026 14:39:44 +0000 (16:39 +0200)
The features are reported in a 0x1 subleaf of 0x1e CPUID leaf.

QEMU commit 956b8f0fc38a5ead18d9bf5ceba0861627738835 (some feature were
later renamed by 85dc6147e79140f17b7e4333ec14f302bf9b5e97, which
happened in the same QEMU release so we don't need to care about the
original names).

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/cpu_map/sync_qemu_models_i386.py
src/cpu_map/x86_features.xml

index 70947970790dec76795ebe4f49a788f0feb1c6f6..e778f99c65cc71a67a22cdbd1a7e83567aef0dfa 100755 (executable)
@@ -108,6 +108,14 @@ def translate_feature(name, model):
         "CPUID_7_2_EDX_RRSBA_CTRL": "rrsba-ctrl",
         "CPUID_7_2_EDX_BHI_CTRL": "bhi-ctrl",
         "CPUID_7_2_EDX_DDPD_U": "ddpd-u",
+        "CPUID_1E_1_EAX_AMX_AVX512": "amx-avx512",
+        "CPUID_1E_1_EAX_AMX_BF16_ALIAS": "amx-bf16-alias",
+        "CPUID_1E_1_EAX_AMX_COMPLEX_ALIAS": "amx-complex-alias",
+        "CPUID_1E_1_EAX_AMX_FP16_ALIAS": "amx-fp16-alias",
+        "CPUID_1E_1_EAX_AMX_FP8": "amx-fp8",
+        "CPUID_1E_1_EAX_AMX_INT8_ALIAS": "amx-int8-alias",
+        "CPUID_1E_1_EAX_AMX_MOVRS": "amx-movrs",
+        "CPUID_1E_1_EAX_AMX_TF32": "amx-tf32",
         "CPUID_24_0_EBX_AVX10_128": "avx10-128",
         "CPUID_24_0_EBX_AVX10_256": "avx10-256",
         "CPUID_24_0_EBX_AVX10_512": "avx10-512",
index 05912ba3af95fb7205a8ac0dbee73a94ba66ca26..0eb6a5c32cf901242cd55612f2065c116f31d27c 100644 (file)
     <cpuid eax_in='0x00000014' ecx_in='0x00000000' ecx='0x80000000'/>
   </feature>
 
+  <!-- cpuid level 0x0000001e, 0x0001 (eax) -->
+  <feature name='amx-int8-alias'>
+    <cpuid eax_in='0x0000001e' ecx_in='0x00000001' eax='0x00000001'/>
+  </feature>
+  <feature name='amx-bf16-alias'>
+    <cpuid eax_in='0x0000001e' ecx_in='0x00000001' eax='0x00000002'/>
+  </feature>
+  <feature name='amx-complex-alias'>
+    <cpuid eax_in='0x0000001e' ecx_in='0x00000001' eax='0x00000004'/>
+  </feature>
+  <feature name='amx-fp16-alias'>
+    <cpuid eax_in='0x0000001e' ecx_in='0x00000001' eax='0x00000008'/>
+  </feature>
+  <feature name='amx-fp8'>
+    <cpuid eax_in='0x0000001e' ecx_in='0x00000001' eax='0x00000010'/>
+  </feature>
+  <feature name='amx-tf32'>
+    <cpuid eax_in='0x0000001e' ecx_in='0x00000001' eax='0x00000040'/>
+  </feature>
+  <feature name='amx-avx512'>
+    <cpuid eax_in='0x0000001e' ecx_in='0x00000001' eax='0x00000080'/>
+  </feature>
+  <feature name='amx-movrs'>
+    <cpuid eax_in='0x0000001e' ecx_in='0x00000001' eax='0x00000100'/>
+  </feature>
+
   <!-- cpuid level 0x00000024, 0x0000 (ebx) -->
   <feature name='avx10-128'>
     <cpuid eax_in='0x00000024' ecx_in='0x00000000' ebx='0x00010000'/>