From: Jiri Denemark <[email protected]>

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 <[email protected]>
---
 src/cpu_map/sync_qemu_models_i386.py |  8 ++++++++
 src/cpu_map/x86_features.xml         | 26 ++++++++++++++++++++++++++
 2 files changed, 34 insertions(+)

diff --git a/src/cpu_map/sync_qemu_models_i386.py 
b/src/cpu_map/sync_qemu_models_i386.py
index 7094797079..e778f99c65 100755
--- a/src/cpu_map/sync_qemu_models_i386.py
+++ b/src/cpu_map/sync_qemu_models_i386.py
@@ -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",
diff --git a/src/cpu_map/x86_features.xml b/src/cpu_map/x86_features.xml
index 05912ba3af..0eb6a5c32c 100644
--- a/src/cpu_map/x86_features.xml
+++ b/src/cpu_map/x86_features.xml
@@ -579,6 +579,32 @@
     <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'/>
-- 
2.54.0

Reply via email to