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

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