[libvirt] [PATCH] cpu_map: Add support for arch-capabilities feature

Jiri Denemark posted 1 patch 5 years, 3 months ago
Test syntax-check passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/3e5f898a677d2502fa2d9e04e4ead24dd16150eb.1547130303.git.jdenemar@redhat.com
src/cpu_map/x86_features.xml                               | 3 +++
tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-ibpb.json | 2 +-
tests/cputestdata/x86_64-cpuid-Xeon-E5-2609-v3.json        | 2 +-
tests/cputestdata/x86_64-cpuid-Xeon-E5-2623-v4.json        | 2 +-
tests/cputestdata/x86_64-cpuid-Xeon-Gold-5115.json         | 2 +-
5 files changed, 7 insertions(+), 4 deletions(-)
[libvirt] [PATCH] cpu_map: Add support for arch-capabilities feature
Posted by Jiri Denemark 5 years, 3 months ago
The feature was added to QEMU in 3.1.0 and it is currently blocking
migration, which is expected to change in the future. Luckily 3.1.0 is
new enough to give us migratability hints on each feature via
query-cpu-model-expension, which means we don't need to use the
"migratable" attribute on the CPU map XML.

The kernel calls this feature arch_capabilities and RHEL/CentOS 7.* use
arch-facilities. Apparently some CPU test files were gathered with the
RHEL version of QEMU. Let's update the test files to avoid possible
confusion about the correct naming.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
---
 src/cpu_map/x86_features.xml                               | 3 +++
 tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-ibpb.json | 2 +-
 tests/cputestdata/x86_64-cpuid-Xeon-E5-2609-v3.json        | 2 +-
 tests/cputestdata/x86_64-cpuid-Xeon-E5-2623-v4.json        | 2 +-
 tests/cputestdata/x86_64-cpuid-Xeon-Gold-5115.json         | 2 +-
 5 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/cpu_map/x86_features.xml b/src/cpu_map/x86_features.xml
index 59236456d6..02431bea29 100644
--- a/src/cpu_map/x86_features.xml
+++ b/src/cpu_map/x86_features.xml
@@ -326,6 +326,9 @@
   <feature name='stibp'>
     <cpuid eax_in='0x07' ecx_in='0x00' edx='0x08000000'/>
   </feature>
+  <feature name='arch-capabilities'> <!-- arch_capabilities, arch-facilities -->
+    <cpuid eax_in='0x07' ecx_in='0x00' edx='0x20000000'/>
+  </feature>
   <feature name='ssbd'>
     <cpuid eax_in='0x07' ecx_in='0x00' edx='0x80000000'/>
   </feature>
diff --git a/tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-ibpb.json b/tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-ibpb.json
index 94a60fcc8f..1f53bb8bf3 100644
--- a/tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-ibpb.json
+++ b/tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-ibpb.json
@@ -232,7 +232,7 @@
         "avx512vbmi": false,
         "kvm-asyncpf": true,
         "spec-ctrl": false,
-        "arch-facilities": false,
+        "arch-capabilities": false,
         "model": 1,
         "node-id": -1
       }
diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-E5-2609-v3.json b/tests/cputestdata/x86_64-cpuid-Xeon-E5-2609-v3.json
index 10c5434263..6bdaf6e83a 100644
--- a/tests/cputestdata/x86_64-cpuid-Xeon-E5-2609-v3.json
+++ b/tests/cputestdata/x86_64-cpuid-Xeon-E5-2609-v3.json
@@ -232,7 +232,7 @@
         "avx512vbmi": false,
         "kvm-asyncpf": true,
         "spec-ctrl": true,
-        "arch-facilities": false,
+        "arch-capabilities": false,
         "model": 63,
         "node-id": -1
       }
diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-E5-2623-v4.json b/tests/cputestdata/x86_64-cpuid-Xeon-E5-2623-v4.json
index 0506dec0a7..2c6be20768 100644
--- a/tests/cputestdata/x86_64-cpuid-Xeon-E5-2623-v4.json
+++ b/tests/cputestdata/x86_64-cpuid-Xeon-E5-2623-v4.json
@@ -232,7 +232,7 @@
         "avx512vbmi": false,
         "kvm-asyncpf": true,
         "spec-ctrl": true,
-        "arch-facilities": false,
+        "arch-capabilities": false,
         "model": 79,
         "node-id": -1
       }
diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-Gold-5115.json b/tests/cputestdata/x86_64-cpuid-Xeon-Gold-5115.json
index 79f3580219..79b47a56fb 100644
--- a/tests/cputestdata/x86_64-cpuid-Xeon-Gold-5115.json
+++ b/tests/cputestdata/x86_64-cpuid-Xeon-Gold-5115.json
@@ -232,7 +232,7 @@
         "avx512vbmi": false,
         "kvm-asyncpf": true,
         "spec-ctrl": true,
-        "arch-facilities": false,
+        "arch-capabilities": false,
         "model": 85,
         "node-id": -1
       }
-- 
2.20.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] cpu_map: Add support for arch-capabilities feature
Posted by Ján Tomko 5 years, 3 months ago
On Thu, Jan 10, 2019 at 03:25:03PM +0100, Jiri Denemark wrote:
>The feature was added to QEMU in 3.1.0 and it is currently blocking
>migration, which is expected to change in the future. Luckily 3.1.0 is
>new enough to give us migratability hints on each feature via
>query-cpu-model-expension, which means we don't need to use the
>"migratable" attribute on the CPU map XML.
>
>The kernel calls this feature arch_capabilities and RHEL/CentOS 7.* use
>arch-facilities. Apparently some CPU test files were gathered with the
>RHEL version of QEMU. Let's update the test files to avoid possible
>confusion about the correct naming.
>
>Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
>---
> src/cpu_map/x86_features.xml                               | 3 +++
> tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-ibpb.json | 2 +-
> tests/cputestdata/x86_64-cpuid-Xeon-E5-2609-v3.json        | 2 +-
> tests/cputestdata/x86_64-cpuid-Xeon-E5-2623-v4.json        | 2 +-
> tests/cputestdata/x86_64-cpuid-Xeon-Gold-5115.json         | 2 +-
> 5 files changed, 7 insertions(+), 4 deletions(-)
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>

Jano
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list