x86/cpu: Enable direct stores cpu features
v2 cover x86/cpu: Enable direct stores cpu features
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(-)
Signature · 1 line
2.7.4
PATCH v2 1/2 x86/cpu: Enable MOVDIRI cpu feature
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
--- target/i386/cpu.c | 2 +- target/i386/cpu.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)
target/i386/cpu.c +1 -1
@@ -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 = {
target/i386/cpu.h +1 -0
@@ -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 */
Signature · 1 line
2.7.4
PATCH v2 2/2 x86/cpu: Enable MOVDIR64B cpu feature
In reply to Liu JingqiMOVDIR64B 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
--- target/i386/cpu.c | 2 +- target/i386/cpu.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)
target/i386/cpu.c +1 -1
@@ -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,
target/i386/cpu.h +1 -0
@@ -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 */
Signature · 1 line
2.7.4
Quoted 5 lines · 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.
Queueing for 3.2, thanks.
Signature · 1 line
Eduardo