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

8b1478
From f326041af5bd8ebebee83dbc296ab853955cd806 Mon Sep 17 00:00:00 2001
8b1478
From: "plai@redhat.com" <plai@redhat.com>
8b1478
Date: Tue, 4 Jun 2019 21:47:21 +0200
8b1478
Subject: [PATCH 02/23] i386: Add CPUID bit and feature words for
8b1478
 IA32_ARCH_CAPABILITIES MSR
8b1478
8b1478
RH-Author: plai@redhat.com
8b1478
Message-id: <1559684847-10889-3-git-send-email-plai@redhat.com>
8b1478
Patchwork-id: 88533
8b1478
O-Subject: [RHEL7.7 qemu-kvm-rhev PATCH v4 2/8] i386: Add CPUID bit and feature words for IA32_ARCH_CAPABILITIES MSR
8b1478
Bugzilla: 1709972
8b1478
RH-Acked-by: Eduardo Habkost <ehabkost@redhat.com>
8b1478
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
8b1478
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
8b1478
8b1478
From: Robert Hoo <robert.hu@linux.intel.com>
8b1478
8b1478
Support of IA32_PRED_CMD MSR already be enumerated by same CPUID bit as
8b1478
SPEC_CTRL.
8b1478
8b1478
At present, mark CPUID_7_0_EDX_ARCH_CAPABILITIES unmigratable, per Paolo's
8b1478
comment.
8b1478
8b1478
Signed-off-by: Robert Hoo <robert.hu@linux.intel.com>
8b1478
Message-Id: <1530781798-183214-3-git-send-email-robert.hu@linux.intel.com>
8b1478
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
8b1478
(cherry picked from commit 3fc7c73139d2d38ae80c3b0bc963b1ac1555924c)
8b1478
Signed-off-by: Paul Lai <plai@redhat.com>
8b1478
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
8b1478
---
8b1478
 target/i386/cpu.c | 3 ++-
8b1478
 target/i386/cpu.h | 1 +
8b1478
 2 files changed, 3 insertions(+), 1 deletion(-)
8b1478
8b1478
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
8b1478
index 4558b1a..4c7364b 100644
8b1478
--- a/target/i386/cpu.c
8b1478
+++ b/target/i386/cpu.c
8b1478
@@ -1008,12 +1008,13 @@ static FeatureWordInfo feature_word_info[FEATURE_WORDS] = {
8b1478
             NULL, NULL, NULL, NULL,
8b1478
             NULL, NULL, NULL, NULL,
8b1478
             NULL, NULL, "spec-ctrl", "stibp",
8b1478
-            NULL, NULL, NULL, "ssbd",
8b1478
+            NULL, "arch-capabilities", NULL, "ssbd",
8b1478
         },
8b1478
         .cpuid_eax = 7,
8b1478
         .cpuid_needs_ecx = true, .cpuid_ecx = 0,
8b1478
         .cpuid_reg = R_EDX,
8b1478
         .tcg_features = TCG_7_0_EDX_FEATURES,
8b1478
+        .unmigratable_flags = CPUID_7_0_EDX_ARCH_CAPABILITIES,
8b1478
     },
8b1478
     [FEAT_8000_0007_EDX] = {
8b1478
         .feat_names = {
8b1478
diff --git a/target/i386/cpu.h b/target/i386/cpu.h
8b1478
index aabb6c8..eb39724 100644
8b1478
--- a/target/i386/cpu.h
8b1478
+++ b/target/i386/cpu.h
8b1478
@@ -689,6 +689,7 @@ typedef uint32_t FeatureWordArray[FEATURE_WORDS];
8b1478
 #define CPUID_7_0_EDX_AVX512_4VNNIW (1U << 2) /* AVX512 Neural Network Instructions */
8b1478
 #define CPUID_7_0_EDX_AVX512_4FMAPS (1U << 3) /* AVX512 Multiply Accumulation Single Precision */
8b1478
 #define CPUID_7_0_EDX_SPEC_CTRL     (1U << 26) /* Speculation Control */
8b1478
+#define CPUID_7_0_EDX_ARCH_CAPABILITIES (1U << 29)  /*Arch Capabilities*/
8b1478
 #define CPUID_7_0_EDX_SPEC_CTRL_SSBD  (1U << 31) /* Speculative Store Bypass Disable */
8b1478
 
8b1478
 #define KVM_HINTS_DEDICATED (1U << 0)
8b1478
-- 
8b1478
1.8.3.1
8b1478