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