yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
b38b0f
From 1e661277e83c9b2e29bf5e2e77f358355aa11c8a Mon Sep 17 00:00:00 2001
b38b0f
From: "plai@redhat.com" <plai@redhat.com>
b38b0f
Date: Wed, 3 Apr 2019 15:54:28 +0100
b38b0f
Subject: [PATCH 04/10] i386: Add CPUID bit for WBNOINVD
b38b0f
b38b0f
RH-Author: plai@redhat.com
b38b0f
Message-id: <1554306874-28796-5-git-send-email-plai@redhat.com>
b38b0f
Patchwork-id: 85382
b38b0f
O-Subject: [RHEL8.1 qemu-kvm PATCH resend 04/10] i386: Add CPUID bit for WBNOINVD
b38b0f
Bugzilla: 1561761
b38b0f
RH-Acked-by: Eduardo Habkost <ehabkost@redhat.com>
b38b0f
RH-Acked-by: Igor Mammedov <imammedo@redhat.com>
b38b0f
RH-Acked-by: Michael S. Tsirkin <mst@redhat.com>
b38b0f
b38b0f
From: Robert Hoo <robert.hu@linux.intel.com>
b38b0f
b38b0f
WBNOINVD: Write back and do not invalidate cache, enumerated by
b38b0f
CPUID.(EAX=80000008H, ECX=0):EBX[bit 9].
b38b0f
b38b0f
Signed-off-by: Robert Hoo <robert.hu@linux.intel.com>
b38b0f
Message-Id: <1530781798-183214-5-git-send-email-robert.hu@linux.intel.com>
b38b0f
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
b38b0f
(cherry picked from commit 59a80a19ca31a6fff9fdbb6b4cf55a5a0767c3bc)
b38b0f
Signed-off-by: Paul Lai <plai@redhat.com>
b38b0f
b38b0f
Resolved Conflicts:
b38b0f
	target/i386/cpu.h
b38b0f
b38b0f
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
b38b0f
---
b38b0f
 target/i386/cpu.c | 2 +-
b38b0f
 target/i386/cpu.h | 2 ++
b38b0f
 2 files changed, 3 insertions(+), 1 deletion(-)
b38b0f
b38b0f
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
b38b0f
index fec39bd..8b9a9f6 100644
b38b0f
--- a/target/i386/cpu.c
b38b0f
+++ b/target/i386/cpu.c
b38b0f
@@ -1036,7 +1036,7 @@ static FeatureWordInfo feature_word_info[FEATURE_WORDS] = {
b38b0f
         .feat_names = {
b38b0f
             NULL, NULL, NULL, NULL,
b38b0f
             NULL, NULL, NULL, NULL,
b38b0f
-            NULL, NULL, NULL, NULL,
b38b0f
+            NULL, "wbnoinvd", NULL, NULL,
b38b0f
             "ibpb", NULL, NULL, NULL,
b38b0f
             NULL, NULL, NULL, NULL,
b38b0f
             NULL, NULL, NULL, NULL,
b38b0f
diff --git a/target/i386/cpu.h b/target/i386/cpu.h
b38b0f
index 3b2ea97..dd4493e 100644
b38b0f
--- a/target/i386/cpu.h
b38b0f
+++ b/target/i386/cpu.h
b38b0f
@@ -693,6 +693,8 @@ typedef uint32_t FeatureWordArray[FEATURE_WORDS];
b38b0f
 
b38b0f
 #define KVM_HINTS_DEDICATED (1U << 0)
b38b0f
 
b38b0f
+#define CPUID_8000_0008_EBX_WBNOINVD  (1U << 9)  /* Write back and
b38b0f
+                                                                             do not invalidate cache */
b38b0f
 #define CPUID_8000_0008_EBX_IBPB    (1U << 12) /* Indirect Branch Prediction Barrier */
b38b0f
 
b38b0f
 #define CPUID_XSAVE_XSAVEOPT   (1U << 0)
b38b0f
-- 
b38b0f
1.8.3.1
b38b0f