7548c0
From bb9f39342d4ea6b76b67378f514f52a9627206b9 Mon Sep 17 00:00:00 2001
7548c0
Message-Id: <bb9f39342d4ea6b76b67378f514f52a9627206b9@dist-git>
7548c0
From: Tim Wiederhake <twiederh@redhat.com>
7548c0
Date: Wed, 3 Mar 2021 11:11:52 +0100
7548c0
Subject: [PATCH] cpumap: Add support for ibrs CPU feature
7548c0
MIME-Version: 1.0
7548c0
Content-Type: text/plain; charset=UTF-8
7548c0
Content-Transfer-Encoding: 8bit
7548c0
7548c0
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
7548c0
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
7548c0
(cherry picked from commit 5c17a7ba41670f3182186c06e621995b5d03fc95)
7548c0
7548c0
https://bugzilla.redhat.com/show_bug.cgi?id=1926864
7548c0
7548c0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
7548c0
Message-Id: <0aee3baa35e04f56e3c95bb2f60c8a17d7806e7a.1614766279.git.jdenemar@redhat.com>
7548c0
Reviewed-by: Ján Tomko <jtomko@redhat.com>
7548c0
---
7548c0
 src/cpu_map/x86_features.xml                               | 3 +++
7548c0
 tests/cputestdata/x86_64-cpuid-EPYC-7502-32-Core-guest.xml | 1 +
7548c0
 tests/cputestdata/x86_64-cpuid-EPYC-7502-32-Core-host.xml  | 1 +
7548c0
 3 files changed, 5 insertions(+)
7548c0
7548c0
diff --git a/src/cpu_map/x86_features.xml b/src/cpu_map/x86_features.xml
7548c0
index 83d8e641a8..abefb7928e 100644
7548c0
--- a/src/cpu_map/x86_features.xml
7548c0
+++ b/src/cpu_map/x86_features.xml
7548c0
@@ -501,6 +501,9 @@
7548c0
   <feature name='ibpb'>
7548c0
     <cpuid eax_in='0x80000008' ebx='0x00001000'/>
7548c0
   </feature>
7548c0
+  <feature name='ibrs'>
7548c0
+    <cpuid eax_in='0x80000008' ebx='0x00004000'/>
7548c0
+  </feature>
7548c0
   <feature name='amd-stibp'>
7548c0
     <cpuid eax_in='0x80000008' ebx='0x00008000'/>
7548c0
   </feature>
7548c0
diff --git a/tests/cputestdata/x86_64-cpuid-EPYC-7502-32-Core-guest.xml b/tests/cputestdata/x86_64-cpuid-EPYC-7502-32-Core-guest.xml
7548c0
index 6d95b508b2..40e7912398 100644
7548c0
--- a/tests/cputestdata/x86_64-cpuid-EPYC-7502-32-Core-guest.xml
7548c0
+++ b/tests/cputestdata/x86_64-cpuid-EPYC-7502-32-Core-guest.xml
7548c0
@@ -17,6 +17,7 @@
7548c0
   <feature policy='require' name='topoext'/>
7548c0
   <feature policy='require' name='perfctr_nb'/>
7548c0
   <feature policy='require' name='invtsc'/>
7548c0
+  <feature policy='require' name='ibrs'/>
7548c0
   <feature policy='require' name='amd-ssbd'/>
7548c0
   <feature policy='require' name='lbrv'/>
7548c0
   <feature policy='require' name='svm-lock'/>
7548c0
diff --git a/tests/cputestdata/x86_64-cpuid-EPYC-7502-32-Core-host.xml b/tests/cputestdata/x86_64-cpuid-EPYC-7502-32-Core-host.xml
7548c0
index 65eaeabdd0..9f8108cdaa 100644
7548c0
--- a/tests/cputestdata/x86_64-cpuid-EPYC-7502-32-Core-host.xml
7548c0
+++ b/tests/cputestdata/x86_64-cpuid-EPYC-7502-32-Core-host.xml
7548c0
@@ -18,6 +18,7 @@
7548c0
   <feature name='topoext'/>
7548c0
   <feature name='perfctr_nb'/>
7548c0
   <feature name='invtsc'/>
7548c0
+  <feature name='ibrs'/>
7548c0
   <feature name='amd-ssbd'/>
7548c0
   <feature name='lbrv'/>
7548c0
   <feature name='svm-lock'/>
7548c0
-- 
7548c0
2.30.0
7548c0