yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

Blame SOURCES/kvm-x86-cpu-Enable-CLDEMOTE-Demote-Cache-Line-cpu-featur.patch

b38b0f
From a10f2cff4a418edae4f3040c4bf09e5aad80316a Mon Sep 17 00:00:00 2001
b38b0f
From: "plai@redhat.com" <plai@redhat.com>
b38b0f
Date: Mon, 20 May 2019 20:05:56 +0100
b38b0f
Subject: [PATCH 1/5] x86/cpu: Enable CLDEMOTE(Demote Cache Line) cpu feature
b38b0f
b38b0f
RH-Author: plai@redhat.com
b38b0f
Message-id: <1554409731-21082-1-git-send-email-plai@redhat.com>
b38b0f
Patchwork-id: 85447
b38b0f
O-Subject: [RHEL8.1 qemu-kvm PATCH] x86/cpu: Enable CLDEMOTE(Demote Cache Line) cpu feature
b38b0f
Bugzilla: 1696436
b38b0f
RH-Acked-by: Eduardo Habkost <ehabkost@redhat.com>
b38b0f
RH-Acked-by: John Snow <jsnow@redhat.com>
b38b0f
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
b38b0f
b38b0f
From: Jingqi Liu <jingqi.liu@intel.com>
b38b0f
b38b0f
BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1696436
b38b0f
Brew:  http://brewweb.devel.redhat.com/brew/taskinfo?taskID=20946375
b38b0f
Branch: rhel-8.1.0
b38b0f
b38b0f
Tested by Intel QA on SNR (simics)
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 | 1 +
b38b0f
 2 files changed, 2 insertions(+), 1 deletion(-)
b38b0f
b38b0f
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
b38b0f
index 8ff6c38..77be7e8 100644
b38b0f
--- a/target/i386/cpu.c
b38b0f
+++ b/target/i386/cpu.c
b38b0f
@@ -1025,7 +1025,7 @@ static FeatureWordInfo feature_word_info[FEATURE_WORDS] = {
b38b0f
             "avx512bitalg", NULL, "avx512-vpopcntdq", NULL,
b38b0f
             "la57", NULL, NULL, NULL,
b38b0f
             NULL, NULL, "rdpid", NULL,
b38b0f
-            NULL, NULL, NULL, NULL,
b38b0f
+            NULL, "cldemote", NULL, NULL,
b38b0f
             NULL, NULL, NULL, NULL,
b38b0f
         },
b38b0f
         .cpuid = {
b38b0f
diff --git a/target/i386/cpu.h b/target/i386/cpu.h
b38b0f
index 3ae0e8c..4f9df6e 100644
b38b0f
--- a/target/i386/cpu.h
b38b0f
+++ b/target/i386/cpu.h
b38b0f
@@ -684,6 +684,7 @@ typedef uint32_t FeatureWordArray[FEATURE_WORDS];
b38b0f
 #define CPUID_7_0_ECX_AVX512_VPOPCNTDQ (1U << 14) /* POPCNT for vectors of DW/QW */
b38b0f
 #define CPUID_7_0_ECX_LA57     (1U << 16)
b38b0f
 #define CPUID_7_0_ECX_RDPID    (1U << 22)
b38b0f
+#define CPUID_7_0_ECX_CLDEMOTE (1U << 25)  /* CLDEMOTE Instruction */
b38b0f
 
b38b0f
 #define CPUID_7_0_EDX_AVX512_4VNNIW (1U << 2) /* AVX512 Neural Network Instructions */
b38b0f
 #define CPUID_7_0_EDX_AVX512_4FMAPS (1U << 3) /* AVX512 Multiply Accumulation Single Precision */
b38b0f
-- 
b38b0f
1.8.3.1
b38b0f