Skip to contentSkip to conversation

i386: remove the 'INTEL_PT' CPUID bit from named CPU models

PATCH In review Paolo Bonzini 3 participants 6 messages Dec 21, 2018 – Dec 24, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i386: remove the 'INTEL_PT' CPUID bit from named CPU models

From: Robert Hoo <[email protected]>

Processor tracing is not yet implemented for KVM and it will be an opt in feature requiring a special module parameter. Disable it, because it is wrong to enable it by default and it is impossible that no one has ever used it.

---
 target/i386/cpu.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
target/i386/cpu.c +3 -5
index dae46f0319..9c54c41e7a 100644
@@ -2493,8 +2493,7 @@ static X86CPUDefinition builtin_x86_defs[] = {
             CPUID_7_0_EBX_SMAP | CPUID_7_0_EBX_CLWB |
             CPUID_7_0_EBX_AVX512F | CPUID_7_0_EBX_AVX512DQ |
             CPUID_7_0_EBX_AVX512BW | CPUID_7_0_EBX_AVX512CD |
-            CPUID_7_0_EBX_AVX512VL | CPUID_7_0_EBX_CLFLUSHOPT |
-            CPUID_7_0_EBX_INTEL_PT,
+            CPUID_7_0_EBX_AVX512VL | CPUID_7_0_EBX_CLFLUSHOPT,
         .features[FEAT_7_0_ECX] =
             CPUID_7_0_ECX_PKU | CPUID_7_0_ECX_OSPKE |
             CPUID_7_0_ECX_AVX512VNNI,
@@ -2546,7 +2545,7 @@ static X86CPUDefinition builtin_x86_defs[] = {
             CPUID_7_0_EBX_HLE | CPUID_7_0_EBX_AVX2 | CPUID_7_0_EBX_SMEP |
             CPUID_7_0_EBX_BMI2 | CPUID_7_0_EBX_ERMS | CPUID_7_0_EBX_INVPCID |
             CPUID_7_0_EBX_RTM | CPUID_7_0_EBX_RDSEED | CPUID_7_0_EBX_ADX |
-            CPUID_7_0_EBX_SMAP | CPUID_7_0_EBX_INTEL_PT,
+            CPUID_7_0_EBX_SMAP,
         .features[FEAT_7_0_ECX] =
             CPUID_7_0_ECX_VBMI | CPUID_7_0_ECX_UMIP | CPUID_7_0_ECX_PKU |
             CPUID_7_0_ECX_OSPKE | CPUID_7_0_ECX_VBMI2 | CPUID_7_0_ECX_GFNI |
@@ -2604,8 +2603,7 @@ static X86CPUDefinition builtin_x86_defs[] = {
             CPUID_7_0_EBX_SMAP | CPUID_7_0_EBX_CLWB |
             CPUID_7_0_EBX_AVX512F | CPUID_7_0_EBX_AVX512DQ |
             CPUID_7_0_EBX_AVX512BW | CPUID_7_0_EBX_AVX512CD |
-            CPUID_7_0_EBX_AVX512VL | CPUID_7_0_EBX_CLFLUSHOPT |
-            CPUID_7_0_EBX_INTEL_PT,
+            CPUID_7_0_EBX_AVX512VL | CPUID_7_0_EBX_CLFLUSHOPT,
         .features[FEAT_7_0_ECX] =
             CPUID_7_0_ECX_VBMI | CPUID_7_0_ECX_UMIP | CPUID_7_0_ECX_PKU |
             CPUID_7_0_ECX_OSPKE | CPUID_7_0_ECX_VBMI2 | CPUID_7_0_ECX_GFNI |
Signature · 1 line
2.20.1
#1 lore raw

Hi Paolo,

Quoted 8 lines · Paolo Bonzini

From: Robert Hoo <[email protected]>

Processor tracing is not yet implemented for KVM and it will be an opt in feature requiring a special module parameter. Disable it, because it is wrong to enable it by default and it is impossible that no one has ever used it.

Does this patch misses Robert S-o-b?

Quoted 39 lines
---
 target/i386/cpu.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
target/i386/cpu.c +3 -5
index dae46f0319..9c54c41e7a 100644
@@ -2493,8 +2493,7 @@ static X86CPUDefinition builtin_x86_defs[] = {
             CPUID_7_0_EBX_SMAP | CPUID_7_0_EBX_CLWB |
             CPUID_7_0_EBX_AVX512F | CPUID_7_0_EBX_AVX512DQ |
             CPUID_7_0_EBX_AVX512BW | CPUID_7_0_EBX_AVX512CD |
-            CPUID_7_0_EBX_AVX512VL | CPUID_7_0_EBX_CLFLUSHOPT |
-            CPUID_7_0_EBX_INTEL_PT,
+            CPUID_7_0_EBX_AVX512VL | CPUID_7_0_EBX_CLFLUSHOPT,
         .features[FEAT_7_0_ECX] =
             CPUID_7_0_ECX_PKU | CPUID_7_0_ECX_OSPKE |
             CPUID_7_0_ECX_AVX512VNNI,
@@ -2546,7 +2545,7 @@ static X86CPUDefinition builtin_x86_defs[] = {
             CPUID_7_0_EBX_HLE | CPUID_7_0_EBX_AVX2 | CPUID_7_0_EBX_SMEP |
             CPUID_7_0_EBX_BMI2 | CPUID_7_0_EBX_ERMS | CPUID_7_0_EBX_INVPCID |
             CPUID_7_0_EBX_RTM | CPUID_7_0_EBX_RDSEED | CPUID_7_0_EBX_ADX |
-            CPUID_7_0_EBX_SMAP | CPUID_7_0_EBX_INTEL_PT,
+            CPUID_7_0_EBX_SMAP,
         .features[FEAT_7_0_ECX] =
             CPUID_7_0_ECX_VBMI | CPUID_7_0_ECX_UMIP | CPUID_7_0_ECX_PKU |
             CPUID_7_0_ECX_OSPKE | CPUID_7_0_ECX_VBMI2 | CPUID_7_0_ECX_GFNI |
@@ -2604,8 +2603,7 @@ static X86CPUDefinition builtin_x86_defs[] = {
             CPUID_7_0_EBX_SMAP | CPUID_7_0_EBX_CLWB |
             CPUID_7_0_EBX_AVX512F | CPUID_7_0_EBX_AVX512DQ |
             CPUID_7_0_EBX_AVX512BW | CPUID_7_0_EBX_AVX512CD |
-            CPUID_7_0_EBX_AVX512VL | CPUID_7_0_EBX_CLFLUSHOPT |
-            CPUID_7_0_EBX_INTEL_PT,
+            CPUID_7_0_EBX_AVX512VL | CPUID_7_0_EBX_CLFLUSHOPT,
         .features[FEAT_7_0_ECX] =
             CPUID_7_0_ECX_VBMI | CPUID_7_0_ECX_UMIP | CPUID_7_0_ECX_PKU |
             CPUID_7_0_ECX_OSPKE | CPUID_7_0_ECX_VBMI2 | CPUID_7_0_ECX_GFNI |
#2 lore raw
Quoted 10 lines · Philippe Mathieu-Daudé

Hi Paolo,

Quoted 7 lines · Paolo Bonzini

From: Robert Hoo <[email protected]>

Processor tracing is not yet implemented for KVM and it will be an opt in feature requiring a special module parameter. Disable it, because it is wrong to enable it by default and it is impossible that no one has ever used it.

Quoted 4 lines
Quoted 1 line

Does this patch misses Robert S-o-b?

No, the author is wrong, it should be me. "git commit -c" apparently copies the author from the original commit.

Paolo

Quoted 39 lines
Quoted 39 lines
---
 target/i386/cpu.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
target/i386/cpu.c +3 -5
index dae46f0319..9c54c41e7a 100644
@@ -2493,8 +2493,7 @@ static X86CPUDefinition builtin_x86_defs[] = {
             CPUID_7_0_EBX_SMAP | CPUID_7_0_EBX_CLWB |
             CPUID_7_0_EBX_AVX512F | CPUID_7_0_EBX_AVX512DQ |
             CPUID_7_0_EBX_AVX512BW | CPUID_7_0_EBX_AVX512CD |
-            CPUID_7_0_EBX_AVX512VL | CPUID_7_0_EBX_CLFLUSHOPT |
-            CPUID_7_0_EBX_INTEL_PT,
+            CPUID_7_0_EBX_AVX512VL | CPUID_7_0_EBX_CLFLUSHOPT,
         .features[FEAT_7_0_ECX] =
             CPUID_7_0_ECX_PKU | CPUID_7_0_ECX_OSPKE |
             CPUID_7_0_ECX_AVX512VNNI,
@@ -2546,7 +2545,7 @@ static X86CPUDefinition builtin_x86_defs[] = {
             CPUID_7_0_EBX_HLE | CPUID_7_0_EBX_AVX2 | CPUID_7_0_EBX_SMEP |
             CPUID_7_0_EBX_BMI2 | CPUID_7_0_EBX_ERMS | CPUID_7_0_EBX_INVPCID |
             CPUID_7_0_EBX_RTM | CPUID_7_0_EBX_RDSEED | CPUID_7_0_EBX_ADX |
-            CPUID_7_0_EBX_SMAP | CPUID_7_0_EBX_INTEL_PT,
+            CPUID_7_0_EBX_SMAP,
         .features[FEAT_7_0_ECX] =
             CPUID_7_0_ECX_VBMI | CPUID_7_0_ECX_UMIP | CPUID_7_0_ECX_PKU |
             CPUID_7_0_ECX_OSPKE | CPUID_7_0_ECX_VBMI2 | CPUID_7_0_ECX_GFNI |
@@ -2604,8 +2603,7 @@ static X86CPUDefinition builtin_x86_defs[] = {
             CPUID_7_0_EBX_SMAP | CPUID_7_0_EBX_CLWB |
             CPUID_7_0_EBX_AVX512F | CPUID_7_0_EBX_AVX512DQ |
             CPUID_7_0_EBX_AVX512BW | CPUID_7_0_EBX_AVX512CD |
-            CPUID_7_0_EBX_AVX512VL | CPUID_7_0_EBX_CLFLUSHOPT |
-            CPUID_7_0_EBX_INTEL_PT,
+            CPUID_7_0_EBX_AVX512VL | CPUID_7_0_EBX_CLFLUSHOPT,
         .features[FEAT_7_0_ECX] =
             CPUID_7_0_ECX_VBMI | CPUID_7_0_ECX_UMIP | CPUID_7_0_ECX_PKU |
             CPUID_7_0_ECX_OSPKE | CPUID_7_0_ECX_VBMI2 | CPUID_7_0_ECX_GFNI |
#3 lore raw
Quoted 12 lines · Paolo Bonzini
Quoted 11 lines · Philippe Mathieu-Daudé

Hi Paolo,

Quoted 8 lines · Paolo Bonzini

From: Robert Hoo <[email protected]>

Processor tracing is not yet implemented for KVM and it will be an
opt in feature requiring a special module parameter. Disable it, because it is wrong to enable it by default and it is impossible that no one has ever used it.

Quoted 4 lines
Quoted 4 lines
Quoted 1 line

Does this patch misses Robert S-o-b?

Paolo's right. It didn't come from me.

Quoted 5 lines

No, the author is wrong, it should be me.  "git commit -c" apparently copies the author from the original commit.

Paolo

Hi Paolo, would you hold on INTEL_PT removal for a moment? I think I need Luwei's double confirm.
(Added him in receiver list.)

Quoted 52 lines
Quoted 50 lines
Quoted 50 lines

---
 target/i386/cpu.c | 8 +++-----

 1 file changed, 3 insertions(+), 5 deletions(-)
target/i386/cpu.c +0 -0
index dae46f0319..9c54c41e7a 100644
@@ -2493,8 +2493,7 @@ static X86CPUDefinition builtin_x86_defs[]
 = {

             CPUID_7_0_EBX_SMAP | CPUID_7_0_EBX_CLWB | CPUID_7_0_EBX_AVX512F | CPUID_7_0_EBX_AVX512DQ | CPUID_7_0_EBX_AVX512BW | CPUID_7_0_EBX_AVX512CD | -            CPUID_7_0_EBX_AVX512VL | CPUID_7_0_EBX_CLFLUSHOPT | -            CPUID_7_0_EBX_INTEL_PT,
+            CPUID_7_0_EBX_AVX512VL | CPUID_7_0_EBX_CLFLUSHOPT, .features[FEAT_7_0_ECX] =
             CPUID_7_0_ECX_PKU | CPUID_7_0_ECX_OSPKE | CPUID_7_0_ECX_AVX512VNNI,

target/i386/cpu.c +0 -0
@@ -2546,7 +2545,7 @@ static X86CPUDefinition builtin_x86_defs[]
 = {

             CPUID_7_0_EBX_HLE | CPUID_7_0_EBX_AVX2 | CPUID_7_0_EBX_SMEP |
             CPUID_7_0_EBX_BMI2 | CPUID_7_0_EBX_ERMS | CPUID_7_0_EBX_INVPCID |
             CPUID_7_0_EBX_RTM | CPUID_7_0_EBX_RDSEED | CPUID_7_0_EBX_ADX |
-            CPUID_7_0_EBX_SMAP | CPUID_7_0_EBX_INTEL_PT, +            CPUID_7_0_EBX_SMAP, .features[FEAT_7_0_ECX] = CPUID_7_0_ECX_VBMI | CPUID_7_0_ECX_UMIP | CPUID_7_0_ECX_PKU |
             CPUID_7_0_ECX_OSPKE | CPUID_7_0_ECX_VBMI2 | CPUID_7_0_ECX_GFNI |

target/i386/cpu.c +0 -0
@@ -2604,8 +2603,7 @@ static X86CPUDefinition builtin_x86_defs[]
 = {

             CPUID_7_0_EBX_SMAP | CPUID_7_0_EBX_CLWB | CPUID_7_0_EBX_AVX512F | CPUID_7_0_EBX_AVX512DQ | CPUID_7_0_EBX_AVX512BW | CPUID_7_0_EBX_AVX512CD | -            CPUID_7_0_EBX_AVX512VL | CPUID_7_0_EBX_CLFLUSHOPT | -            CPUID_7_0_EBX_INTEL_PT,
+            CPUID_7_0_EBX_AVX512VL | CPUID_7_0_EBX_CLFLUSHOPT, .features[FEAT_7_0_ECX] =
             CPUID_7_0_ECX_VBMI | CPUID_7_0_ECX_UMIP | CPUID_7_0_ECX_PKU |
             CPUID_7_0_ECX_OSPKE | CPUID_7_0_ECX_VBMI2 | CPUID_7_0_ECX_GFNI |

#4 lore raw
Quoted 20 lines · Robert Hoo
Quoted 12 lines · Paolo Bonzini
Quoted 11 lines · Philippe Mathieu-Daudé

Hi Paolo,

Quoted 8 lines · Paolo Bonzini

From: Robert Hoo <[email protected]>

Processor tracing is not yet implemented for KVM and it will be an
opt in feature requiring a special module parameter. Disable it, because it is wrong to enable it by default and it is impossible that no one has ever used it.

Quoted 4 lines
Quoted 4 lines
Quoted 1 line

Does this patch misses Robert S-o-b?

Paolo's right. It didn't come from me.

Quoted 1 line
Quoted 7 lines
Quoted 4 lines

No, the author is wrong, it should be me.  "git commit -c" apparently copies the author from the original commit.

Paolo

Hi Paolo, would you hold on INTEL_PT removal for a moment? I think I need Luwei's double confirm.

I'm aware of Luwei's patches, they will be in 4.21. As mentioned in the commit message, they will be an opt-in feature, not enabled by default; the default is system-wide tracing and no INTEL_PT CPUID bit available in the guest.

Paolo

#5 lore raw
Quoted 32 lines · Paolo Bonzini
Quoted 25 lines · Robert Hoo
Quoted 13 lines · Paolo Bonzini
Quoted 12 lines · Philippe Mathieu-Daudé

Hi Paolo,

Quoted 9 lines · Paolo Bonzini

From: Robert Hoo <[email protected]>

Processor tracing is not yet implemented for KVM and it will be
an
opt in feature requiring a special module parameter. Disable it, because it is wrong to enable it by default and it is impossible that no one has ever used it.

Quoted 4 lines
Quoted 4 lines
Quoted 1 line

Does this patch misses Robert S-o-b?

Paolo's right. It didn't come from me.

Quoted 5 lines

No, the author is wrong, it should be me.  "git commit -c" apparently
copies the author from the original commit.

Quoted 5 lines
Quoted 1 line

Paolo

Hi Paolo, would you hold on INTEL_PT removal for a moment? I think I
need Luwei's double confirm.

Quoted 8 lines

I'm aware of Luwei's patches, they will be in 4.21.  As mentioned in the
commit message, they will be an opt-in feature, not enabled by default;
the default is system-wide tracing and no INTEL_PT CPUID bit available
in the guest.

OK, synced with Luwei, agree with you.

Quoted 1 line

Paolo