397dc2
From 287c112945dda0837c31348dc3c07ad7ed19596f Mon Sep 17 00:00:00 2001
397dc2
Message-Id: <287c112945dda0837c31348dc3c07ad7ed19596f@dist-git>
397dc2
From: Tim Wiederhake <twiederh@redhat.com>
397dc2
Date: Fri, 15 Jan 2021 15:17:20 +0100
397dc2
Subject: [PATCH] cpu_map: Add support for core-capability CPU feature
397dc2
397dc2
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
397dc2
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
397dc2
(cherry picked from commit e06dd56032acf904da1aedfc097fa0cae7cb0b0f)
397dc2
397dc2
https://bugzilla.redhat.com/show_bug.cgi?id=1537734
397dc2
397dc2
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
397dc2
Message-Id: <20210115141722.14986-5-twiederh@redhat.com>
397dc2
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
397dc2
---
397dc2
 src/cpu_map/x86_features.xml                           | 3 +++
397dc2
 tests/cputestdata/x86_64-cpuid-Atom-P5362-disabled.xml | 2 +-
397dc2
 tests/cputestdata/x86_64-cpuid-Atom-P5362-guest.xml    | 1 +
397dc2
 tests/cputestdata/x86_64-cpuid-Atom-P5362-host.xml     | 1 +
397dc2
 4 files changed, 6 insertions(+), 1 deletion(-)
397dc2
397dc2
diff --git a/src/cpu_map/x86_features.xml b/src/cpu_map/x86_features.xml
397dc2
index 70e1c7b3fc..f8c0b9046c 100644
397dc2
--- a/src/cpu_map/x86_features.xml
397dc2
+++ b/src/cpu_map/x86_features.xml
397dc2
@@ -350,6 +350,9 @@
397dc2
   <feature name='arch-capabilities'> 
397dc2
     <cpuid eax_in='0x07' ecx_in='0x00' edx='0x20000000'/>
397dc2
   </feature>
397dc2
+  <feature name='core-capability'>
397dc2
+    <cpuid eax_in='0x07' ecx_in='0x00' edx='0x40000000'/>
397dc2
+  </feature>
397dc2
   <feature name='ssbd'>
397dc2
     <cpuid eax_in='0x07' ecx_in='0x00' edx='0x80000000'/>
397dc2
   </feature>
397dc2
diff --git a/tests/cputestdata/x86_64-cpuid-Atom-P5362-disabled.xml b/tests/cputestdata/x86_64-cpuid-Atom-P5362-disabled.xml
397dc2
index 842c7b4a2a..50e8084140 100644
397dc2
--- a/tests/cputestdata/x86_64-cpuid-Atom-P5362-disabled.xml
397dc2
+++ b/tests/cputestdata/x86_64-cpuid-Atom-P5362-disabled.xml
397dc2
@@ -1,7 +1,7 @@
397dc2
 
397dc2
 <cpudata arch='x86'>
397dc2
   <cpuid eax_in='0x00000001' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x080041dc' edx='0xb0600000'/>
397dc2
-  <cpuid eax_in='0x00000007' ecx_in='0x00' eax='0x00000000' ebx='0x02001000' ecx='0x00000020' edx='0x00000000'/>
397dc2
+  <cpuid eax_in='0x00000007' ecx_in='0x00' eax='0x00000000' ebx='0x02001000' ecx='0x00000020' edx='0x40000000'/>
397dc2
   <cpuid eax_in='0x0000000f' ecx_in='0x01' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000006'/>
397dc2
   <cpuid eax_in='0x80000007' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000100'/>
397dc2
   <msr index='0x10a' edx='0x00000000' eax='0x00000100'/>
397dc2
diff --git a/tests/cputestdata/x86_64-cpuid-Atom-P5362-guest.xml b/tests/cputestdata/x86_64-cpuid-Atom-P5362-guest.xml
397dc2
index 0f3e2e506e..4ad95f06b4 100644
397dc2
--- a/tests/cputestdata/x86_64-cpuid-Atom-P5362-guest.xml
397dc2
+++ b/tests/cputestdata/x86_64-cpuid-Atom-P5362-guest.xml
397dc2
@@ -37,6 +37,7 @@
397dc2
   <feature policy='require' name='md-clear'/>
397dc2
   <feature policy='require' name='stibp'/>
397dc2
   <feature policy='require' name='arch-capabilities'/>
397dc2
+  <feature policy='require' name='core-capability'/>
397dc2
   <feature policy='require' name='ssbd'/>
397dc2
   <feature policy='require' name='xsaveopt'/>
397dc2
   <feature policy='require' name='xsavec'/>
397dc2
diff --git a/tests/cputestdata/x86_64-cpuid-Atom-P5362-host.xml b/tests/cputestdata/x86_64-cpuid-Atom-P5362-host.xml
397dc2
index 3bd009c1da..cc2b208e6a 100644
397dc2
--- a/tests/cputestdata/x86_64-cpuid-Atom-P5362-host.xml
397dc2
+++ b/tests/cputestdata/x86_64-cpuid-Atom-P5362-host.xml
397dc2
@@ -47,6 +47,7 @@
397dc2
   <feature name='md-clear'/>
397dc2
   <feature name='stibp'/>
397dc2
   <feature name='arch-capabilities'/>
397dc2
+  <feature name='core-capability'/>
397dc2
   <feature name='ssbd'/>
397dc2
   <feature name='xsaveopt'/>
397dc2
   <feature name='xsavec'/>
397dc2
-- 
397dc2
2.30.0
397dc2