All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 0/2] x86/cpu: Enable direct stores cpu features
@ 2018-11-06  7:13 Liu Jingqi
  2018-11-06  7:13 ` [Qemu-devel] [PATCH v2 1/2] x86/cpu: Enable MOVDIRI cpu feature Liu Jingqi
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Liu Jingqi @ 2018-11-06  7:13 UTC (permalink / raw)
  To: pbonzini, ehabkost, rth; +Cc: qemu-devel, tao3.xu, Liu Jingqi

Enable direct stores cpu features including MOVDIRI and MOVDIR64B.

MOVDIRI moves doubleword or quadword from register to memory through
direct store.
MOVDIR64B moves 64-bytes as direct-store with 64-bytes write atomicity.

Changelog:
v2:
	Separated from the series http://lists.nongnu.org/archive/html/qemu-devel/2018-07/msg02330.html
	since umonitor/umwait/tpause cpu features are not ready yet.
v1:
	Sent out with umonitor/umwait/tpause cpu features.

Liu Jingqi (2):
  x86/cpu: Enable MOVDIRI cpu feature
  x86/cpu: Enable MOVDIR64B cpu feature

 target/i386/cpu.c | 4 ++--
 target/i386/cpu.h | 2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Qemu-devel] [PATCH v2 1/2] x86/cpu: Enable MOVDIRI cpu feature
  2018-11-06  7:13 [Qemu-devel] [PATCH v2 0/2] x86/cpu: Enable direct stores cpu features Liu Jingqi
@ 2018-11-06  7:13 ` Liu Jingqi
  2018-11-06  7:13 ` [Qemu-devel] [PATCH v2 2/2] x86/cpu: Enable MOVDIR64B " Liu Jingqi
  2018-11-07 18:36 ` [Qemu-devel] [PATCH v2 0/2] x86/cpu: Enable direct stores cpu features Eduardo Habkost
  2 siblings, 0 replies; 4+ messages in thread
From: Liu Jingqi @ 2018-11-06  7:13 UTC (permalink / raw)
  To: pbonzini, ehabkost, rth; +Cc: qemu-devel, tao3.xu, Liu Jingqi

MOVDIRI moves doubleword or quadword from register to memory through
direct store which is implemented by using write combining (WC) for
writing data directly into memory without caching the data.

The bit definition:
CPUID.(EAX=7,ECX=0):ECX[bit 27] MOVDIRI

The release document ref below link:
https://software.intel.com/sites/default/files/managed/c5/15/\
architecture-instruction-set-extensions-programming-reference.pdf

Cc: Xu Tao <tao3.xu@intel.com>
Signed-off-by: Liu Jingqi <jingqi.liu@intel.com>
---
 target/i386/cpu.c | 2 +-
 target/i386/cpu.h | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index af7e9f0..d9ab68c 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -1023,7 +1023,7 @@ static FeatureWordInfo feature_word_info[FEATURE_WORDS] = {
             "avx512bitalg", NULL, "avx512-vpopcntdq", NULL,
             "la57", NULL, NULL, NULL,
             NULL, NULL, "rdpid", NULL,
-            NULL, "cldemote", NULL, NULL,
+            NULL, "cldemote", NULL, "movdiri",
             NULL, NULL, NULL, NULL,
         },
         .cpuid = {
diff --git a/target/i386/cpu.h b/target/i386/cpu.h
index ad0e0b4..3debba3 100644
--- a/target/i386/cpu.h
+++ b/target/i386/cpu.h
@@ -687,6 +687,7 @@ typedef uint32_t FeatureWordArray[FEATURE_WORDS];
 #define CPUID_7_0_ECX_LA57     (1U << 16)
 #define CPUID_7_0_ECX_RDPID    (1U << 22)
 #define CPUID_7_0_ECX_CLDEMOTE (1U << 25)  /* CLDEMOTE Instruction */
+#define CPUID_7_0_ECX_MOVDIRI  (1U << 27)  /* MOVDIRI Instruction */
 
 #define CPUID_7_0_EDX_AVX512_4VNNIW (1U << 2) /* AVX512 Neural Network Instructions */
 #define CPUID_7_0_EDX_AVX512_4FMAPS (1U << 3) /* AVX512 Multiply Accumulation Single Precision */
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Qemu-devel] [PATCH v2 2/2] x86/cpu: Enable MOVDIR64B cpu feature
  2018-11-06  7:13 [Qemu-devel] [PATCH v2 0/2] x86/cpu: Enable direct stores cpu features Liu Jingqi
  2018-11-06  7:13 ` [Qemu-devel] [PATCH v2 1/2] x86/cpu: Enable MOVDIRI cpu feature Liu Jingqi
@ 2018-11-06  7:13 ` Liu Jingqi
  2018-11-07 18:36 ` [Qemu-devel] [PATCH v2 0/2] x86/cpu: Enable direct stores cpu features Eduardo Habkost
  2 siblings, 0 replies; 4+ messages in thread
From: Liu Jingqi @ 2018-11-06  7:13 UTC (permalink / raw)
  To: pbonzini, ehabkost, rth; +Cc: qemu-devel, tao3.xu, Liu Jingqi

MOVDIR64B moves 64-bytes as direct-store with 64-bytes write atomicity.
Direct store is implemented by using write combining (WC) for writing
data directly into memory without caching the data.

The bit definition:
CPUID.(EAX=7,ECX=0):ECX[bit 28] MOVDIR64B

The release document ref below link:
https://software.intel.com/sites/default/files/managed/c5/15/\
architecture-instruction-set-extensions-programming-reference.pdf

Cc: Xu Tao <tao3.xu@intel.com>
Signed-off-by: Liu Jingqi <jingqi.liu@intel.com>
---
 target/i386/cpu.c | 2 +-
 target/i386/cpu.h | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index d9ab68c..32e1551 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -1024,7 +1024,7 @@ static FeatureWordInfo feature_word_info[FEATURE_WORDS] = {
             "la57", NULL, NULL, NULL,
             NULL, NULL, "rdpid", NULL,
             NULL, "cldemote", NULL, "movdiri",
-            NULL, NULL, NULL, NULL,
+            "movdir64b", NULL, NULL, NULL,
         },
         .cpuid = {
             .eax = 7,
diff --git a/target/i386/cpu.h b/target/i386/cpu.h
index 3debba3..937a3a2 100644
--- a/target/i386/cpu.h
+++ b/target/i386/cpu.h
@@ -688,6 +688,7 @@ typedef uint32_t FeatureWordArray[FEATURE_WORDS];
 #define CPUID_7_0_ECX_RDPID    (1U << 22)
 #define CPUID_7_0_ECX_CLDEMOTE (1U << 25)  /* CLDEMOTE Instruction */
 #define CPUID_7_0_ECX_MOVDIRI  (1U << 27)  /* MOVDIRI Instruction */
+#define CPUID_7_0_ECX_MOVDIR64B (1U << 28) /* MOVDIR64B Instruction */
 
 #define CPUID_7_0_EDX_AVX512_4VNNIW (1U << 2) /* AVX512 Neural Network Instructions */
 #define CPUID_7_0_EDX_AVX512_4FMAPS (1U << 3) /* AVX512 Multiply Accumulation Single Precision */
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH v2 0/2] x86/cpu: Enable direct stores cpu features
  2018-11-06  7:13 [Qemu-devel] [PATCH v2 0/2] x86/cpu: Enable direct stores cpu features Liu Jingqi
  2018-11-06  7:13 ` [Qemu-devel] [PATCH v2 1/2] x86/cpu: Enable MOVDIRI cpu feature Liu Jingqi
  2018-11-06  7:13 ` [Qemu-devel] [PATCH v2 2/2] x86/cpu: Enable MOVDIR64B " Liu Jingqi
@ 2018-11-07 18:36 ` Eduardo Habkost
  2 siblings, 0 replies; 4+ messages in thread
From: Eduardo Habkost @ 2018-11-07 18:36 UTC (permalink / raw)
  To: Liu Jingqi; +Cc: pbonzini, rth, qemu-devel, tao3.xu

On Tue, Nov 06, 2018 at 03:13:25PM +0800, Liu Jingqi wrote:
> Enable direct stores cpu features including MOVDIRI and MOVDIR64B.
> 
> MOVDIRI moves doubleword or quadword from register to memory through
> direct store.
> MOVDIR64B moves 64-bytes as direct-store with 64-bytes write atomicity.

Queueing for 3.2, thanks.

-- 
Eduardo

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-11-07 18:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-06  7:13 [Qemu-devel] [PATCH v2 0/2] x86/cpu: Enable direct stores cpu features Liu Jingqi
2018-11-06  7:13 ` [Qemu-devel] [PATCH v2 1/2] x86/cpu: Enable MOVDIRI cpu feature Liu Jingqi
2018-11-06  7:13 ` [Qemu-devel] [PATCH v2 2/2] x86/cpu: Enable MOVDIR64B " Liu Jingqi
2018-11-07 18:36 ` [Qemu-devel] [PATCH v2 0/2] x86/cpu: Enable direct stores cpu features Eduardo Habkost

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.