c480ed
From bd665085c2cd890f2249042f135b7a1735932d1b Mon Sep 17 00:00:00 2001
c480ed
Message-Id: <bd665085c2cd890f2249042f135b7a1735932d1b@dist-git>
c480ed
From: Jiri Denemark <jdenemar@redhat.com>
c480ed
Date: Fri, 21 Jun 2019 09:24:48 +0200
c480ed
Subject: [PATCH] cpu_map: Add support for arch-capabilities feature
c480ed
MIME-Version: 1.0
c480ed
Content-Type: text/plain; charset=UTF-8
c480ed
Content-Transfer-Encoding: 8bit
c480ed
c480ed
The feature was added to QEMU in 3.1.0 and it is currently blocking
c480ed
migration, which is expected to change in the future. Luckily 3.1.0 is
c480ed
new enough to give us migratability hints on each feature via
c480ed
query-cpu-model-expension, which means we don't need to use the
c480ed
"migratable" attribute on the CPU map XML.
c480ed
c480ed
The kernel calls this feature arch_capabilities and RHEL/CentOS 7.* use
c480ed
arch-facilities. Apparently some CPU test files were gathered with the
c480ed
RHEL version of QEMU. Let's update the test files to avoid possible
c480ed
confusion about the correct naming.
c480ed
c480ed
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
c480ed
Reviewed-by: Ján Tomko <jtomko@redhat.com>
c480ed
(cherry picked from commit 511df17aec36385320dbcc088ba85968537d1d42)
c480ed
c480ed
https://bugzilla.redhat.com/show_bug.cgi?id=1693433
c480ed
c480ed
Conflicts:
c480ed
	src/cpu_map/x86_features.xml
c480ed
            - cpu_map split was not backported
c480ed
c480ed
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
c480ed
Message-Id: <fc8d72f3a2191ef85b537943aa1cc844f50b038d.1561068591.git.jdenemar@redhat.com>
c480ed
Reviewed-by: Ján Tomko <jtomko@redhat.com>
c480ed
---
c480ed
 src/cpu/cpu_map.xml                                        | 3 +++
c480ed
 tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-ibpb.json | 2 +-
c480ed
 tests/cputestdata/x86_64-cpuid-Xeon-E5-2609-v3.json        | 2 +-
c480ed
 tests/cputestdata/x86_64-cpuid-Xeon-E5-2623-v4.json        | 2 +-
c480ed
 tests/cputestdata/x86_64-cpuid-Xeon-Gold-5115.json         | 2 +-
c480ed
 5 files changed, 7 insertions(+), 4 deletions(-)
c480ed
c480ed
diff --git a/src/cpu/cpu_map.xml b/src/cpu/cpu_map.xml
c480ed
index ceee0ae489..a9f284fbbe 100644
c480ed
--- a/src/cpu/cpu_map.xml
c480ed
+++ b/src/cpu/cpu_map.xml
c480ed
@@ -337,6 +337,9 @@
c480ed
     <feature name='stibp'>
c480ed
       <cpuid eax_in='0x07' ecx_in='0x00' edx='0x08000000'/>
c480ed
     </feature>
c480ed
+    <feature name='arch-capabilities'> 
c480ed
+      <cpuid eax_in='0x07' ecx_in='0x00' edx='0x20000000'/>
c480ed
+    </feature>
c480ed
     <feature name='ssbd'>
c480ed
       <cpuid eax_in='0x07' ecx_in='0x00' edx='0x80000000'/>
c480ed
     </feature>
c480ed
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
c480ed
index 94a60fcc8f..1f53bb8bf3 100644
c480ed
--- a/tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-ibpb.json
c480ed
+++ b/tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-ibpb.json
c480ed
@@ -232,7 +232,7 @@
c480ed
         "avx512vbmi": false,
c480ed
         "kvm-asyncpf": true,
c480ed
         "spec-ctrl": false,
c480ed
-        "arch-facilities": false,
c480ed
+        "arch-capabilities": false,
c480ed
         "model": 1,
c480ed
         "node-id": -1
c480ed
       }
c480ed
diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-E5-2609-v3.json b/tests/cputestdata/x86_64-cpuid-Xeon-E5-2609-v3.json
c480ed
index 10c5434263..6bdaf6e83a 100644
c480ed
--- a/tests/cputestdata/x86_64-cpuid-Xeon-E5-2609-v3.json
c480ed
+++ b/tests/cputestdata/x86_64-cpuid-Xeon-E5-2609-v3.json
c480ed
@@ -232,7 +232,7 @@
c480ed
         "avx512vbmi": false,
c480ed
         "kvm-asyncpf": true,
c480ed
         "spec-ctrl": true,
c480ed
-        "arch-facilities": false,
c480ed
+        "arch-capabilities": false,
c480ed
         "model": 63,
c480ed
         "node-id": -1
c480ed
       }
c480ed
diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-E5-2623-v4.json b/tests/cputestdata/x86_64-cpuid-Xeon-E5-2623-v4.json
c480ed
index 0506dec0a7..2c6be20768 100644
c480ed
--- a/tests/cputestdata/x86_64-cpuid-Xeon-E5-2623-v4.json
c480ed
+++ b/tests/cputestdata/x86_64-cpuid-Xeon-E5-2623-v4.json
c480ed
@@ -232,7 +232,7 @@
c480ed
         "avx512vbmi": false,
c480ed
         "kvm-asyncpf": true,
c480ed
         "spec-ctrl": true,
c480ed
-        "arch-facilities": false,
c480ed
+        "arch-capabilities": false,
c480ed
         "model": 79,
c480ed
         "node-id": -1
c480ed
       }
c480ed
diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-Gold-5115.json b/tests/cputestdata/x86_64-cpuid-Xeon-Gold-5115.json
c480ed
index 79f3580219..79b47a56fb 100644
c480ed
--- a/tests/cputestdata/x86_64-cpuid-Xeon-Gold-5115.json
c480ed
+++ b/tests/cputestdata/x86_64-cpuid-Xeon-Gold-5115.json
c480ed
@@ -232,7 +232,7 @@
c480ed
         "avx512vbmi": false,
c480ed
         "kvm-asyncpf": true,
c480ed
         "spec-ctrl": true,
c480ed
-        "arch-facilities": false,
c480ed
+        "arch-capabilities": false,
c480ed
         "model": 85,
c480ed
         "node-id": -1
c480ed
       }
c480ed
-- 
c480ed
2.22.0
c480ed