yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
016a62
From 04387fbe913b26a3819d711ea91b99be6faa8616 Mon Sep 17 00:00:00 2001
016a62
From: "plai@redhat.com" <plai@redhat.com>
016a62
Date: Tue, 26 Nov 2019 19:36:50 +0000
016a62
Subject: [PATCH 06/11] x86/cpu: Enable MOVDIR64B cpu feature
016a62
016a62
RH-Author: plai@redhat.com
016a62
Message-id: <1574797015-32564-3-git-send-email-plai@redhat.com>
016a62
Patchwork-id: 92691
016a62
O-Subject: [RHEL8.2 qemu-kvm PATCH 2/7] x86/cpu: Enable MOVDIR64B cpu feature
016a62
Bugzilla: 1634827
016a62
RH-Acked-by: Eduardo Habkost <ehabkost@redhat.com>
016a62
RH-Acked-by: Michael S. Tsirkin <mst@redhat.com>
016a62
RH-Acked-by: Igor Mammedov <imammedo@redhat.com>
016a62
016a62
From: Liu Jingqi <jingqi.liu@intel.com>
016a62
016a62
MOVDIR64B moves 64-bytes as direct-store with 64-bytes write atomicity.
016a62
Direct store is implemented by using write combining (WC) for writing
016a62
data directly into memory without caching the data.
016a62
016a62
The bit definition:
016a62
CPUID.(EAX=7,ECX=0):ECX[bit 28] MOVDIR64B
016a62
016a62
The release document ref below link:
016a62
https://software.intel.com/sites/default/files/managed/c5/15/\
016a62
architecture-instruction-set-extensions-programming-reference.pdf
016a62
016a62
Cc: Xu Tao <tao3.xu@intel.com>
016a62
Signed-off-by: Liu Jingqi <jingqi.liu@intel.com>
016a62
Message-Id: <1541488407-17045-3-git-send-email-jingqi.liu@intel.com>
016a62
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
016a62
(cherry picked from commit 1c65775ffc2dbd276a8bffe592feba0e186a151c)
016a62
Signed-off-by: Paul Lai <plai@redhat.com>
016a62
016a62
Resolved Conflicts:
016a62
	target/i386/cpu.c
016a62
016a62
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
016a62
---
016a62
 target/i386/cpu.c | 2 +-
016a62
 target/i386/cpu.h | 1 +
016a62
 2 files changed, 2 insertions(+), 1 deletion(-)
016a62
016a62
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
016a62
index f2ab558..307b629 100644
016a62
--- a/target/i386/cpu.c
016a62
+++ b/target/i386/cpu.c
016a62
@@ -1022,7 +1022,7 @@ static FeatureWordInfo feature_word_info[FEATURE_WORDS] = {
016a62
             "la57", NULL, NULL, NULL,
016a62
             NULL, NULL, "rdpid", NULL,
016a62
             NULL, "cldemote", NULL, "movdiri",
016a62
-            NULL, NULL, NULL, NULL,
016a62
+            "movdir64b", NULL, NULL, NULL,
016a62
         },
016a62
         .cpuid = {
016a62
             .eax = 7,
016a62
diff --git a/target/i386/cpu.h b/target/i386/cpu.h
016a62
index 6ba0b1e..d33fa8d 100644
016a62
--- a/target/i386/cpu.h
016a62
+++ b/target/i386/cpu.h
016a62
@@ -719,6 +719,7 @@ typedef uint64_t FeatureWordArray[FEATURE_WORDS];
016a62
 #define CPUID_7_0_ECX_RDPID    (1U << 22)
016a62
 #define CPUID_7_0_ECX_CLDEMOTE (1U << 25)  /* CLDEMOTE Instruction */
016a62
 #define CPUID_7_0_ECX_MOVDIRI  (1U << 27)  /* MOVDIRI Instruction */
016a62
+#define CPUID_7_0_ECX_MOVDIR64B (1U << 28) /* MOVDIR64B Instruction */
016a62
 
016a62
 #define CPUID_7_0_EDX_AVX512_4VNNIW (1U << 2) /* AVX512 Neural Network Instructions */
016a62
 #define CPUID_7_0_EDX_AVX512_4FMAPS (1U << 3) /* AVX512 Multiply Accumulation Single Precision */
016a62
-- 
016a62
1.8.3.1
016a62