diff mbox series

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

Message ID 20181221063002.7570-1-pbonzini@redhat.com
State New
Headers show
Series i386: remove the 'INTEL_PT' CPUID bit from named CPU models | expand

Commit Message

Paolo Bonzini Dec. 21, 2018, 6:30 a.m. UTC
From: Robert Hoo <robert.hu@linux.intel.com>

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.

Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 target/i386/cpu.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

Comments

Philippe Mathieu-Daudé Dec. 21, 2018, 3:22 p.m. UTC | #1
Hi Paolo,

On 12/21/18 7:30 AM, Paolo Bonzini wrote:
> From: Robert Hoo <robert.hu@linux.intel.com>
> 
> 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.
> 
> Cc: qemu-stable@nongnu.org

Does this patch misses Robert S-o-b?
Signed-off-by: Robert Hoo <robert.hu@linux.intel.com>

> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  target/i386/cpu.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/target/i386/cpu.c b/target/i386/cpu.c
> index dae46f0319..9c54c41e7a 100644
> --- a/target/i386/cpu.c
> +++ b/target/i386/cpu.c
> @@ -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 |
>
Paolo Bonzini Dec. 21, 2018, 3:27 p.m. UTC | #2
On 21/12/18 16:22, Philippe Mathieu-Daudé wrote:
> Hi Paolo,
> 
> On 12/21/18 7:30 AM, Paolo Bonzini wrote:
>> From: Robert Hoo <robert.hu@linux.intel.com>
>>
>> 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.
>>
>> Cc: qemu-stable@nongnu.org
> 
> Does this patch misses Robert S-o-b?
> Signed-off-by: Robert Hoo <robert.hu@linux.intel.com>

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

Paolo

>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>> ---
>>  target/i386/cpu.c | 8 +++-----
>>  1 file changed, 3 insertions(+), 5 deletions(-)
>>
>> diff --git a/target/i386/cpu.c b/target/i386/cpu.c
>> index dae46f0319..9c54c41e7a 100644
>> --- a/target/i386/cpu.c
>> +++ b/target/i386/cpu.c
>> @@ -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 |
>>
Robert Hoo Dec. 22, 2018, 1:01 a.m. UTC | #3
On Fri, 2018-12-21 at 16:27 +0100, Paolo Bonzini wrote:
> On 21/12/18 16:22, Philippe Mathieu-Daudé wrote:
> > Hi Paolo,
> > 
> > On 12/21/18 7:30 AM, Paolo Bonzini wrote:
> > > From: Robert Hoo <robert.hu@linux.intel.com>
> > > 
> > > 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.
> > > 
> > > Cc: qemu-stable@nongnu.org
> > 
> > Does this patch misses Robert S-o-b?
> > Signed-off-by: Robert Hoo <robert.hu@linux.intel.com>

Paolo's right. It didn't come from me.
> 
> 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.)
> 
> > > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> > > ---
> > >  target/i386/cpu.c | 8 +++-----
> > >  1 file changed, 3 insertions(+), 5 deletions(-)
> > > 
> > > diff --git a/target/i386/cpu.c b/target/i386/cpu.c
> > > index dae46f0319..9c54c41e7a 100644
> > > --- a/target/i386/cpu.c
> > > +++ b/target/i386/cpu.c
> > > @@ -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 |
> > > 
> 
>
Paolo Bonzini Dec. 22, 2018, 9:13 a.m. UTC | #4
On 22/12/18 02:01, Robert Hoo wrote:
> On Fri, 2018-12-21 at 16:27 +0100, Paolo Bonzini wrote:
>> On 21/12/18 16:22, Philippe Mathieu-Daudé wrote:
>>> Hi Paolo,
>>>
>>> On 12/21/18 7:30 AM, Paolo Bonzini wrote:
>>>> From: Robert Hoo <robert.hu@linux.intel.com>
>>>>
>>>> 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.
>>>>
>>>> Cc: qemu-stable@nongnu.org
>>>
>>> Does this patch misses Robert S-o-b?
>>> Signed-off-by: Robert Hoo <robert.hu@linux.intel.com>
> 
> Paolo's right. It didn't come from me.
>>
>> 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
Robert Hoo Dec. 24, 2018, 4:37 a.m. UTC | #5
On Sat, 2018-12-22 at 10:13 +0100, Paolo Bonzini wrote:
> On 22/12/18 02:01, Robert Hoo wrote:
> > On Fri, 2018-12-21 at 16:27 +0100, Paolo Bonzini wrote:
> > > On 21/12/18 16:22, Philippe Mathieu-Daudé wrote:
> > > > Hi Paolo,
> > > > 
> > > > On 12/21/18 7:30 AM, Paolo Bonzini wrote:
> > > > > From: Robert Hoo <robert.hu@linux.intel.com>
> > > > > 
> > > > > 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.
> > > > > 
> > > > > Cc: qemu-stable@nongnu.org
> > > > 
> > > > Does this patch misses Robert S-o-b?
> > > > Signed-off-by: Robert Hoo <robert.hu@linux.intel.com>
> > 
> > Paolo's right. It didn't come from me.
> > > 
> > > 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.
> 
OK, synced with Luwei, agree with you.

> Paolo
diff mbox series

Patch

diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index dae46f0319..9c54c41e7a 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -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 |