4ec855
From a2765b13bbe4a4d5978cd25f451b35dbb137ab6e Mon Sep 17 00:00:00 2001
4ec855
From: "plai@redhat.com" <plai@redhat.com>
4ec855
Date: Tue, 26 Nov 2019 19:36:49 +0000
4ec855
Subject: [PATCH 05/11] x86/cpu: Enable MOVDIRI cpu feature
4ec855
4ec855
RH-Author: plai@redhat.com
4ec855
Message-id: <1574797015-32564-2-git-send-email-plai@redhat.com>
4ec855
Patchwork-id: 92696
4ec855
O-Subject: [RHEL8.2 qemu-kvm PATCH 1/7] x86/cpu: Enable MOVDIRI cpu feature
4ec855
Bugzilla: 1634827
4ec855
RH-Acked-by: Eduardo Habkost <ehabkost@redhat.com>
4ec855
RH-Acked-by: Michael S. Tsirkin <mst@redhat.com>
4ec855
RH-Acked-by: Igor Mammedov <imammedo@redhat.com>
4ec855
4ec855
From: Liu Jingqi <jingqi.liu@intel.com>
4ec855
4ec855
MOVDIRI moves doubleword or quadword from register to memory through
4ec855
direct store which is implemented by using write combining (WC) for
4ec855
writing data directly into memory without caching the data.
4ec855
4ec855
The bit definition:
4ec855
CPUID.(EAX=7,ECX=0):ECX[bit 27] MOVDIRI
4ec855
4ec855
The release document ref below link:
4ec855
https://software.intel.com/sites/default/files/managed/c5/15/\
4ec855
architecture-instruction-set-extensions-programming-reference.pdf
4ec855
4ec855
Cc: Xu Tao <tao3.xu@intel.com>
4ec855
Signed-off-by: Liu Jingqi <jingqi.liu@intel.com>
4ec855
Message-Id: <1541488407-17045-2-git-send-email-jingqi.liu@intel.com>
4ec855
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
4ec855
(cherry picked from commit 24261de4916596d8ab5f5fee67e9e7a19e8325a5)
4ec855
Signed-off-by: Paul Lai <plai@redhat.com>
4ec855
4ec855
Resolved Conflicts:
4ec855
	target/i386/cpu.c
4ec855
	target/i386/cpu.h
4ec855
4ec855
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
4ec855
---
4ec855
 target/i386/cpu.c | 2 +-
4ec855
 target/i386/cpu.h | 1 +
4ec855
 2 files changed, 2 insertions(+), 1 deletion(-)
4ec855
4ec855
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
4ec855
index ef6b958..f2ab558 100644
4ec855
--- a/target/i386/cpu.c
4ec855
+++ b/target/i386/cpu.c
4ec855
@@ -1021,7 +1021,7 @@ static FeatureWordInfo feature_word_info[FEATURE_WORDS] = {
4ec855
             "avx512bitalg", NULL, "avx512-vpopcntdq", NULL,
4ec855
             "la57", NULL, NULL, NULL,
4ec855
             NULL, NULL, "rdpid", NULL,
4ec855
-            NULL, "cldemote", NULL, NULL,
4ec855
+            NULL, "cldemote", NULL, "movdiri",
4ec855
             NULL, NULL, NULL, NULL,
4ec855
         },
4ec855
         .cpuid = {
4ec855
diff --git a/target/i386/cpu.h b/target/i386/cpu.h
4ec855
index 8d8814e..6ba0b1e 100644
4ec855
--- a/target/i386/cpu.h
4ec855
+++ b/target/i386/cpu.h
4ec855
@@ -718,6 +718,7 @@ typedef uint64_t FeatureWordArray[FEATURE_WORDS];
4ec855
 #define CPUID_7_0_ECX_LA57     (1U << 16)
4ec855
 #define CPUID_7_0_ECX_RDPID    (1U << 22)
4ec855
 #define CPUID_7_0_ECX_CLDEMOTE (1U << 25)  /* CLDEMOTE Instruction */
4ec855
+#define CPUID_7_0_ECX_MOVDIRI  (1U << 27)  /* MOVDIRI Instruction */
4ec855
 
4ec855
 #define CPUID_7_0_EDX_AVX512_4VNNIW (1U << 2) /* AVX512 Neural Network Instructions */
4ec855
 #define CPUID_7_0_EDX_AVX512_4FMAPS (1U << 3) /* AVX512 Multiply Accumulation Single Precision */
4ec855
-- 
4ec855
1.8.3.1
4ec855