Blame SOURCES/kvm-i386-Add-CPUID-bit-and-feature-words-for-IA32_ARCH_C.patch

Pablo Greco e6a3ae
From 5765ff204771d519ec6c109a8f6b15871251dff0 Mon Sep 17 00:00:00 2001
Pablo Greco e6a3ae
From: "plai@redhat.com" <plai@redhat.com>
Pablo Greco e6a3ae
Date: Wed, 3 Apr 2019 15:54:26 +0100
Pablo Greco e6a3ae
Subject: [PATCH 02/10] i386: Add CPUID bit and feature words for
Pablo Greco e6a3ae
 IA32_ARCH_CAPABILITIES MSR
Pablo Greco e6a3ae
Pablo Greco e6a3ae
RH-Author: plai@redhat.com
Pablo Greco e6a3ae
Message-id: <1554306874-28796-3-git-send-email-plai@redhat.com>
Pablo Greco e6a3ae
Patchwork-id: 85386
Pablo Greco e6a3ae
O-Subject: [RHEL8.1 qemu-kvm PATCH resend 02/10] i386: Add CPUID bit and feature words for IA32_ARCH_CAPABILITIES MSR
Pablo Greco e6a3ae
Bugzilla: 1561761
Pablo Greco e6a3ae
RH-Acked-by: Eduardo Habkost <ehabkost@redhat.com>
Pablo Greco e6a3ae
RH-Acked-by: Igor Mammedov <imammedo@redhat.com>
Pablo Greco e6a3ae
RH-Acked-by: Michael S. Tsirkin <mst@redhat.com>
Pablo Greco e6a3ae
Pablo Greco e6a3ae
From: Robert Hoo <robert.hu@linux.intel.com>
Pablo Greco e6a3ae
Pablo Greco e6a3ae
Support of IA32_PRED_CMD MSR already be enumerated by same CPUID bit as
Pablo Greco e6a3ae
SPEC_CTRL.
Pablo Greco e6a3ae
Pablo Greco e6a3ae
At present, mark CPUID_7_0_EDX_ARCH_CAPABILITIES unmigratable, per Paolo's
Pablo Greco e6a3ae
comment.
Pablo Greco e6a3ae
Pablo Greco e6a3ae
Signed-off-by: Robert Hoo <robert.hu@linux.intel.com>
Pablo Greco e6a3ae
Message-Id: <1530781798-183214-3-git-send-email-robert.hu@linux.intel.com>
Pablo Greco e6a3ae
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Pablo Greco e6a3ae
(cherry picked from commit 3fc7c73139d2d38ae80c3b0bc963b1ac1555924c)
Pablo Greco e6a3ae
Signed-off-by: Paul Lai <plai@redhat.com>
Pablo Greco e6a3ae
Pablo Greco e6a3ae
Resolved Conflicts:
Pablo Greco e6a3ae
	target/i386/cpu.c
Pablo Greco e6a3ae
Pablo Greco e6a3ae
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
Pablo Greco e6a3ae
---
Pablo Greco e6a3ae
 target/i386/cpu.c | 3 ++-
Pablo Greco e6a3ae
 target/i386/cpu.h | 1 +
Pablo Greco e6a3ae
 2 files changed, 3 insertions(+), 1 deletion(-)
Pablo Greco e6a3ae
Pablo Greco e6a3ae
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
Pablo Greco e6a3ae
index c979feb..6d38ac0 100644
Pablo Greco e6a3ae
--- a/target/i386/cpu.c
Pablo Greco e6a3ae
+++ b/target/i386/cpu.c
Pablo Greco e6a3ae
@@ -1008,12 +1008,13 @@ static FeatureWordInfo feature_word_info[FEATURE_WORDS] = {
Pablo Greco e6a3ae
             NULL, NULL, NULL, NULL,
Pablo Greco e6a3ae
             NULL, NULL, NULL, NULL,
Pablo Greco e6a3ae
             NULL, NULL, "spec-ctrl", "stibp",
Pablo Greco e6a3ae
-            NULL, NULL, NULL, "ssbd",
Pablo Greco e6a3ae
+            NULL, "arch-capabilities", NULL, "ssbd",
Pablo Greco e6a3ae
         },
Pablo Greco e6a3ae
         .cpuid_eax = 7,
Pablo Greco e6a3ae
         .cpuid_needs_ecx = true, .cpuid_ecx = 0,
Pablo Greco e6a3ae
         .cpuid_reg = R_EDX,
Pablo Greco e6a3ae
         .tcg_features = TCG_7_0_EDX_FEATURES,
Pablo Greco e6a3ae
+        .unmigratable_flags = CPUID_7_0_EDX_ARCH_CAPABILITIES,
Pablo Greco e6a3ae
     },
Pablo Greco e6a3ae
     [FEAT_8000_0007_EDX] = {
Pablo Greco e6a3ae
         .feat_names = {
Pablo Greco e6a3ae
diff --git a/target/i386/cpu.h b/target/i386/cpu.h
Pablo Greco e6a3ae
index 1dc565c..e5e5169 100644
Pablo Greco e6a3ae
--- a/target/i386/cpu.h
Pablo Greco e6a3ae
+++ b/target/i386/cpu.h
Pablo Greco e6a3ae
@@ -687,6 +687,7 @@ typedef uint32_t FeatureWordArray[FEATURE_WORDS];
Pablo Greco e6a3ae
 #define CPUID_7_0_EDX_AVX512_4VNNIW (1U << 2) /* AVX512 Neural Network Instructions */
Pablo Greco e6a3ae
 #define CPUID_7_0_EDX_AVX512_4FMAPS (1U << 3) /* AVX512 Multiply Accumulation Single Precision */
Pablo Greco e6a3ae
 #define CPUID_7_0_EDX_SPEC_CTRL     (1U << 26) /* Speculation Control */
Pablo Greco e6a3ae
+#define CPUID_7_0_EDX_ARCH_CAPABILITIES (1U << 29)  /*Arch Capabilities*/
Pablo Greco e6a3ae
 #define CPUID_7_0_EDX_SPEC_CTRL_SSBD  (1U << 31) /* Speculative Store Bypass Disable */
Pablo Greco e6a3ae
 
Pablo Greco e6a3ae
 #define KVM_HINTS_DEDICATED (1U << 0)
Pablo Greco e6a3ae
-- 
Pablo Greco e6a3ae
1.8.3.1
Pablo Greco e6a3ae