77c23f
From 00f916987589f114f42ce20b138c00c47b9e4df7 Mon Sep 17 00:00:00 2001
77c23f
From: "plai@redhat.com" <plai@redhat.com>
77c23f
Date: Fri, 15 May 2020 18:02:41 +0100
77c23f
Subject: [PATCH 14/17] i386: Add macro for stibp
77c23f
77c23f
RH-Author: plai@redhat.com
77c23f
Message-id: <20200515180243.17488-3-plai@redhat.com>
77c23f
Patchwork-id: 96610
77c23f
O-Subject: [RHEL8.2.1 AV qemu-kvm PATCH 2/4] i386: Add macro for stibp
77c23f
Bugzilla: 1769912
77c23f
RH-Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
77c23f
RH-Acked-by: Igor Mammedov <imammedo@redhat.com>
77c23f
RH-Acked-by: Eduardo Habkost <ehabkost@redhat.com>
77c23f
77c23f
From: Cathy Zhang <cathy.zhang@intel.com>
77c23f
77c23f
stibp feature is already added through the following commit.
77c23f
https://github.com/qemu/qemu/commit/0e8916582991b9fd0b94850a8444b8b80d0a0955
77c23f
77c23f
Add a macro for it to allow CPU models to report it when host supports.
77c23f
77c23f
Signed-off-by: Cathy Zhang <cathy.zhang@intel.com>
77c23f
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
77c23f
Reviewed-by: Tao Xu <tao3.xu@intel.com>
77c23f
Message-Id: <1571729728-23284-3-git-send-email-cathy.zhang@intel.com>
77c23f
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
77c23f
(cherry picked from commit 5af514d0cb314f43bc53f2aefb437f6451d64d0c)
77c23f
Signed-off-by: Paul Lai <plai@redhat.com>
77c23f
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
77c23f
---
77c23f
 target/i386/cpu.h | 2 ++
77c23f
 1 file changed, 2 insertions(+)
77c23f
77c23f
diff --git a/target/i386/cpu.h b/target/i386/cpu.h
77c23f
index 60304cc..e77d101 100644
77c23f
--- a/target/i386/cpu.h
77c23f
+++ b/target/i386/cpu.h
77c23f
@@ -772,6 +772,8 @@ typedef uint64_t FeatureWordArray[FEATURE_WORDS];
77c23f
 #define CPUID_7_0_EDX_AVX512_4FMAPS     (1U << 3)
77c23f
 /* Speculation Control */
77c23f
 #define CPUID_7_0_EDX_SPEC_CTRL         (1U << 26)
77c23f
+/* Single Thread Indirect Branch Predictors */
77c23f
+#define CPUID_7_0_EDX_STIBP             (1U << 27)
77c23f
 /* Arch Capabilities */
77c23f
 #define CPUID_7_0_EDX_ARCH_CAPABILITIES (1U << 29)
77c23f
 /* Core Capability */
77c23f
-- 
77c23f
1.8.3.1
77c23f