Skip to contentSkip to conversation

qemu patch for mb_clear

MODERATED Andi Kleen 4 participants 8 messages Jan 9, 2019 – Mar 1, 2019

lore
Share & tools
lore

Andi Kleen

author
#0 lore raw

For reference here is the qemu patch needed for using MB_CLEAR in a KVM guest.

-Andi

target/i386/cpu.c +1 -1
index 677a3bd5fb25..77a1149e4bb3 100644
@@ -1038,7 +1038,7 @@ static FeatureWordInfo feature_word_info[FEATURE_WORDS] = {
         .feat_names = {
             NULL, NULL, "avx512-4vnniw", "avx512-4fmaps",
             NULL, NULL, NULL, NULL,
-            NULL, NULL, NULL, NULL,
+            NULL, NULL, "mbclear", NULL,
             NULL, NULL, NULL, NULL,
             NULL, NULL, "pconfig", NULL,
             NULL, NULL, NULL, NULL,
#1 lore raw
Quoted 3 lines · speck for Andi Kleen

For reference here is the qemu patch needed for using MB_CLEAR in a KVM guest.

I thought it was called 'MD_CLEAR' ?

Quoted 16 lines
(quoted diff) +0 -1
-Andi
target/i386/cpu.c +1 -1
index 677a3bd5fb25..77a1149e4bb3 100644
@@ -1038,7 +1038,7 @@ static FeatureWordInfo feature_word_info[FEATURE_WORDS] = {
         .feat_names = {
             NULL, NULL, "avx512-4vnniw", "avx512-4fmaps",
             NULL, NULL, NULL, NULL,
-            NULL, NULL, NULL, NULL,
+            NULL, NULL, "mbclear", NULL,
             NULL, NULL, NULL, NULL,
             NULL, NULL, "pconfig", NULL,
             NULL, NULL, NULL, NULL,
author
#2 lore raw
Quoted 6 lines · speck for Konrad Rzeszutek Wilk
Quoted 3 lines · speck for Andi Kleen

For reference here is the qemu patch needed for using MB_CLEAR in a KVM guest.

I thought it was called 'MD_CLEAR' ?

So far it's still called MB_CLEAR in the white papers AFAIK.

-Andi

#3 lore raw
In reply to Konrad Rzeszutek Wilk
Quoted 10 lines · speck for Konrad Rzeszutek Wilk
Quoted 3 lines · speck for Andi Kleen

For reference here is the qemu patch needed for using MB_CLEAR in a KVM guest.

I thought it was called 'MD_CLEAR' ?

Quoted 3 lines

-Andi

Quoted 13 lines

target/i386/cpu.c static FeatureWordInfo feature_word_info[FEATURE_WORDS] = { · line 1044

Quoted 13 lines
target/i386/cpu.c +1 -1
index 677a3bd5fb25..77a1149e4bb3 100644
@@ -1038,7 +1038,7 @@ static FeatureWordInfo feature_word_info[FEATURE_WORDS] = {
         .feat_names = {
             NULL, NULL, "avx512-4vnniw", "avx512-4fmaps",
             NULL, NULL, NULL, NULL,
-            NULL, NULL, NULL, NULL,
+            NULL, NULL, "mbclear", NULL,
             NULL, NULL, NULL, NULL,
             NULL, NULL, "pconfig", NULL,
             NULL, NULL, NULL, NULL,

Are there any CPU families which will all have it (e.g. IceLake server, Cascade Lake?). Prerelease/prototype silicon does not count.

Paolo

author
#4 lore raw
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
target/i386/cpu.c +0 -0
index 677a3bd5fb25..77a1149e4bb3 100644
@@ -1038,7 +1038,7 @@ static FeatureWordInfo feature_word_info[FEATURE_WORDS] = {
         .feat_names = {
             NULL, NULL, "avx512-4vnniw", "avx512-4fmaps",
             NULL, NULL, NULL, NULL,
Quoted 8 lines
Quoted 5 lines

target/i386/cpu.c static FeatureWordInfo feature_word_info[FEATURE_WORDS] = { · line 1044

Quoted 5 lines
target/i386/cpu.c +1 -1
-            NULL, NULL, NULL, NULL,
+            NULL, NULL, "mbclear", NULL,
             NULL, NULL, NULL, NULL,
             NULL, NULL, "pconfig", NULL,
             NULL, NULL, NULL, NULL,

Are there any CPU families which will all have it (e.g. IceLake server, Cascade Lake?). Prerelease/prototype silicon does not count.

All the past ones which get the VERW microcode update (somewhere between Nehalem and Skylake)

Future systems which don't have/need VERW won't have it in fact

-Andi

Reviewed-by
#5 lore raw
Quoted 17 lines · speck for Andi Kleen
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
target/i386/cpu.c +0 -0
index 677a3bd5fb25..77a1149e4bb3 100644
@@ -1038,7 +1038,7 @@ static FeatureWordInfo feature_word_info[FEATURE_WORDS] = {
         .feat_names = {
             NULL, NULL, "avx512-4vnniw", "avx512-4fmaps",
             NULL, NULL, NULL, NULL,
Quoted 8 lines
Quoted 5 lines

target/i386/cpu.c static FeatureWordInfo feature_word_info[FEATURE_WORDS] = { · line 1044

Quoted 5 lines
target/i386/cpu.c +1 -1
-            NULL, NULL, NULL, NULL,
+            NULL, NULL, "mbclear", NULL,
             NULL, NULL, NULL, NULL,
             NULL, NULL, "pconfig", NULL,
             NULL, NULL, NULL, NULL,

Are there any CPU families which will all have it (e.g. IceLake server, Cascade Lake?). Prerelease/prototype silicon does not count.

Quoted 4 lines

All the past ones which get the VERW microcode update (somewhere between Nehalem and Skylake)

Future systems which don't have/need VERW won't have it in fact

Then

Thanks!

Paolo

#6 lore raw
In reply to Andi Kleen
Quoted 11 lines · speck for Andi Kleen

For reference here is the qemu patch needed for using MB_CLEAR in a KVM guest.

(quoted diff) +0 -1
-Andi
target/i386/cpu.c +0 -0
index 677a3bd5fb25..77a1149e4bb3 100644

target/i386/cpu.c static FeatureWordInfo feature_word_info[FEATURE_WORDS] = { · line 1044

Quoted 8 lines
target/i386/cpu.c +1 -1
@@ -1038,7 +1038,7 @@ static FeatureWordInfo feature_word_info[FEATURE_WORDS] = {
         .feat_names = {
             NULL, NULL, "avx512-4vnniw", "avx512-4fmaps",
             NULL, NULL, NULL, NULL,
-            NULL, NULL, NULL, NULL,
+            NULL, NULL, "mbclear", NULL,
             NULL, NULL, NULL, NULL,
             NULL, NULL, "pconfig", NULL,
             NULL, NULL, NULL, NULL,

Is this still the latest version of the qemu patch? I assume this needs to be updated to MD_CLEAR.

Signature · 1 line
Josh
#7 lore raw
Quoted 7 lines · Josh Poimboeuf
Quoted 6 lines · speck for Andi Kleen

For reference here is the qemu patch needed for using MB_CLEAR in a KVM guest.

-Andi

Quoted 16 lines

target/i386/cpu.c static FeatureWordInfo feature_word_info[FEATURE_WORDS] = { · line 1044

Quoted 13 lines
target/i386/cpu.c +1 -1
index 677a3bd5fb25..77a1149e4bb3 100644
@@ -1038,7 +1038,7 @@ static FeatureWordInfo feature_word_info[FEATURE_WORDS] = {
         .feat_names = {
             NULL, NULL, "avx512-4vnniw", "avx512-4fmaps",
             NULL, NULL, NULL, NULL,
-            NULL, NULL, NULL, NULL,
+            NULL, NULL, "mbclear", NULL,
             NULL, NULL, NULL, NULL,
             NULL, NULL, "pconfig", NULL,
             NULL, NULL, NULL, NULL,

Is this still the latest version of the qemu patch? I assume this needs to be updated to MD_CLEAR.

Also:

- A patch title and description would be helpful.

- Calling it "md-clear" (with the dash) would be preferable, as people constantly get confused when the names differ (and apparently qemu uses dashes instead of underscores).

Signature · 1 line
Josh