yeahuh / rpms / qemu-kvm

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