Blob Blame History Raw
From 4b6dd39819e82b0775e0f324b0b4efa537882878 Mon Sep 17 00:00:00 2001
Message-Id: <4b6dd39819e82b0775e0f324b0b4efa537882878@dist-git>
From: Tim Wiederhake <twiederh@redhat.com>
Date: Fri, 15 Jan 2021 15:17:21 +0100
Subject: [PATCH] cpu_map: Add support for split-lock-detect CPU feature

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
(cherry picked from commit 13db542cf3099f7955438e208dbe4b2b4e58067e)

https://bugzilla.redhat.com/show_bug.cgi?id=1537734

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Message-Id: <20210115141722.14986-6-twiederh@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
---
 src/cpu_map/x86_features.xml                           | 5 +++++
 tests/cputestdata/x86_64-cpuid-Atom-P5362-disabled.xml | 1 +
 tests/cputestdata/x86_64-cpuid-Atom-P5362-guest.xml    | 1 +
 tests/cputestdata/x86_64-cpuid-Atom-P5362-host.xml     | 1 +
 4 files changed, 8 insertions(+)

diff --git a/src/cpu_map/x86_features.xml b/src/cpu_map/x86_features.xml
index f8c0b9046c..83d8e641a8 100644
--- a/src/cpu_map/x86_features.xml
+++ b/src/cpu_map/x86_features.xml
@@ -574,4 +574,9 @@
   <feature name='taa-no'>
     <msr index='0x10a' edx='0x00000000' eax='0x00000100'/>
   </feature>
+
+  <!-- IA32_CORE_CAPABILITIES features -->
+  <feature name='split-lock-detect'>
+    <msr index='0xcf' edx='0x00000000' eax='0x00000020'/>
+  </feature>
 </cpus>
diff --git a/tests/cputestdata/x86_64-cpuid-Atom-P5362-disabled.xml b/tests/cputestdata/x86_64-cpuid-Atom-P5362-disabled.xml
index 50e8084140..81ffa7bfd3 100644
--- a/tests/cputestdata/x86_64-cpuid-Atom-P5362-disabled.xml
+++ b/tests/cputestdata/x86_64-cpuid-Atom-P5362-disabled.xml
@@ -4,5 +4,6 @@
   <cpuid eax_in='0x00000007' ecx_in='0x00' eax='0x00000000' ebx='0x02001000' ecx='0x00000020' edx='0x40000000'/>
   <cpuid eax_in='0x0000000f' ecx_in='0x01' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000006'/>
   <cpuid eax_in='0x80000007' ecx_in='0x00' eax='0x00000000' ebx='0x00000000' ecx='0x00000000' edx='0x00000100'/>
+  <msr index='0xcf' edx='0x00000000' eax='0x00000020'/>
   <msr index='0x10a' edx='0x00000000' eax='0x00000100'/>
 </cpudata>
diff --git a/tests/cputestdata/x86_64-cpuid-Atom-P5362-guest.xml b/tests/cputestdata/x86_64-cpuid-Atom-P5362-guest.xml
index 4ad95f06b4..2eeff136c4 100644
--- a/tests/cputestdata/x86_64-cpuid-Atom-P5362-guest.xml
+++ b/tests/cputestdata/x86_64-cpuid-Atom-P5362-guest.xml
@@ -53,6 +53,7 @@
   <feature policy='require' name='mds-no'/>
   <feature policy='require' name='pschange-mc-no'/>
   <feature policy='require' name='taa-no'/>
+  <feature policy='require' name='split-lock-detect'/>
   <feature policy='disable' name='avx'/>
   <feature policy='disable' name='f16c'/>
 </cpu>
diff --git a/tests/cputestdata/x86_64-cpuid-Atom-P5362-host.xml b/tests/cputestdata/x86_64-cpuid-Atom-P5362-host.xml
index cc2b208e6a..b3e9d5c1ff 100644
--- a/tests/cputestdata/x86_64-cpuid-Atom-P5362-host.xml
+++ b/tests/cputestdata/x86_64-cpuid-Atom-P5362-host.xml
@@ -64,4 +64,5 @@
   <feature name='mds-no'/>
   <feature name='pschange-mc-no'/>
   <feature name='taa-no'/>
+  <feature name='split-lock-detect'/>
 </cpu>
-- 
2.30.0