[libvirt PATCH] cpu_map: Add cpu feature avx-vnni

Tim Wiederhake posted 1 patch 2 years, 9 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20210610074541.13112-1-twiederh@redhat.com
src/cpu_map/sync_qemu_i386.py | 1 +
src/cpu_map/x86_features.xml  | 3 +++
2 files changed, 4 insertions(+)
[libvirt PATCH] cpu_map: Add cpu feature avx-vnni
Posted by Tim Wiederhake 2 years, 9 months ago
"avx-vvni" was introduced to qemu in commit
c1826ea6a052084f2e6a0bae9dd5932a727df039, adding it Cooperlake.

This feature is currently not used by any libvirt CPU models, but its
addition silences a warning from sync_qemu_i386.py:

```
warning: Unknown feature 'CPUID_7_1_EAX_AVX_VNNI'
warning: Feature unknown to libvirt: CPUID_7_1_EAX_AVX_VNNI
```

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
---
 src/cpu_map/sync_qemu_i386.py | 1 +
 src/cpu_map/x86_features.xml  | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/src/cpu_map/sync_qemu_i386.py b/src/cpu_map/sync_qemu_i386.py
index 92bb58f75b..4dd9f3b84d 100755
--- a/src/cpu_map/sync_qemu_i386.py
+++ b/src/cpu_map/sync_qemu_i386.py
@@ -73,6 +73,7 @@ def translate_feature(name):
         "CPUID_7_0_EDX_SPEC_CTRL_SSBD": "ssbd",
         "CPUID_7_0_EDX_STIBP": "stibp",
         "CPUID_7_1_EAX_AVX512_BF16": "avx512-bf16",
+        "CPUID_7_1_EAX_AVX_VNNI": "avx-vnni",
         "CPUID_8000_0008_EBX_AMD_SSBD": "amd-ssbd",
         "CPUID_8000_0008_EBX_CLZERO": "clzero",
         "CPUID_8000_0008_EBX_IBPB": "ibpb",
diff --git a/src/cpu_map/x86_features.xml b/src/cpu_map/x86_features.xml
index e98b84f3ef..4cf3ff0804 100644
--- a/src/cpu_map/x86_features.xml
+++ b/src/cpu_map/x86_features.xml
@@ -363,6 +363,9 @@
     <cpuid eax_in='0x07' ecx_in='0x00' edx='0x80000000'/>
   </feature>
 
+  <feature name='avx-vnni'>
+    <cpuid eax_in='0x07' ecx_in='0x01' eax='0x00000010'/>
+  </feature>
   <feature name='avx512-bf16'>
     <cpuid eax_in='0x07' ecx_in='0x01' eax='0x00000020'/>
   </feature>
-- 
2.31.1

Re: [libvirt PATCH] cpu_map: Add cpu feature avx-vnni
Posted by Michal Prívozník 2 years, 9 months ago
On 6/10/21 9:45 AM, Tim Wiederhake wrote:
> "avx-vvni" was introduced to qemu in commit
> c1826ea6a052084f2e6a0bae9dd5932a727df039, adding it Cooperlake.
> 
> This feature is currently not used by any libvirt CPU models, but its
> addition silences a warning from sync_qemu_i386.py:
> 
> ```
> warning: Unknown feature 'CPUID_7_1_EAX_AVX_VNNI'
> warning: Feature unknown to libvirt: CPUID_7_1_EAX_AVX_VNNI
> ```
> 
> Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
> ---
>  src/cpu_map/sync_qemu_i386.py | 1 +
>  src/cpu_map/x86_features.xml  | 3 +++
>  2 files changed, 4 insertions(+)

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>

and pushed.

Michal