* [PATCH] Remove MSR_P6_{EVNTSEL0,PERFCTR0} from printk warning list.
@ 2010-06-30 14:27 Jes.Sorensen
2010-07-01 14:38 ` Avi Kivity
0 siblings, 1 reply; 6+ messages in thread
From: Jes.Sorensen @ 2010-06-30 14:27 UTC (permalink / raw)
To: avi; +Cc: kvm
From: Jes Sorensen <Jes.Sorensen@redhat.com>
MSR_P6_EVNTSEL0 and MSR_P6_PERFCTR0 are used to probe for the P6 PMU
for older family 6 CPUs, which is also the default in QEMU. Ie. per
default we get the noise of these warnings in dmesg, confusing users
for no reason.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
---
arch/x86/kvm/x86.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index d0b9252..ac55b92 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -1306,7 +1306,6 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 data)
* which we perfectly emulate ;-). Any other value should be at least
* reported, some guests depend on them.
*/
- case MSR_P6_EVNTSEL0:
case MSR_P6_EVNTSEL1:
case MSR_K7_EVNTSEL0:
case MSR_K7_EVNTSEL1:
@@ -1319,7 +1318,6 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 data)
/* at least RHEL 4 unconditionally writes to the perfctr registers,
* so we ignore writes to make it happy.
*/
- case MSR_P6_PERFCTR0:
case MSR_P6_PERFCTR1:
case MSR_K7_PERFCTR0:
case MSR_K7_PERFCTR1:
--
1.7.0.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] Remove MSR_P6_{EVNTSEL0,PERFCTR0} from printk warning list.
2010-06-30 14:27 [PATCH] Remove MSR_P6_{EVNTSEL0,PERFCTR0} from printk warning list Jes.Sorensen
@ 2010-07-01 14:38 ` Avi Kivity
2010-07-01 14:41 ` Jes Sorensen
0 siblings, 1 reply; 6+ messages in thread
From: Avi Kivity @ 2010-07-01 14:38 UTC (permalink / raw)
To: Jes.Sorensen; +Cc: kvm
On 06/30/2010 05:27 PM, Jes.Sorensen@redhat.com wrote:
> From: Jes Sorensen<Jes.Sorensen@redhat.com>
>
> MSR_P6_EVNTSEL0 and MSR_P6_PERFCTR0 are used to probe for the P6 PMU
> for older family 6 CPUs, which is also the default in QEMU. Ie. per
> default we get the noise of these warnings in dmesg, confusing users
> for no reason.
>
>
For the reason, see the comment above. The guest may be trying to do
something with the counters and expect them to work. Without the
warning we'd have no idea we are knowningly misemulating something.
> Signed-off-by: Jes Sorensen<Jes.Sorensen@redhat.com>
> ---
> arch/x86/kvm/x86.c | 2 --
> 1 files changed, 0 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index d0b9252..ac55b92 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -1306,7 +1306,6 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 data)
> * which we perfectly emulate ;-). Any other value should be at least
> * reported, some guests depend on them.
> */
> - case MSR_P6_EVNTSEL0:
> case MSR_P6_EVNTSEL1:
> case MSR_K7_EVNTSEL0:
> case MSR_K7_EVNTSEL1:
> @@ -1319,7 +1318,6 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 data)
> /* at least RHEL 4 unconditionally writes to the perfctr registers,
> * so we ignore writes to make it happy.
> */
> - case MSR_P6_PERFCTR0:
> case MSR_P6_PERFCTR1:
> case MSR_K7_PERFCTR0:
> case MSR_K7_PERFCTR1:
>
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Remove MSR_P6_{EVNTSEL0,PERFCTR0} from printk warning list.
2010-07-01 14:38 ` Avi Kivity
@ 2010-07-01 14:41 ` Jes Sorensen
2010-07-01 14:44 ` Avi Kivity
0 siblings, 1 reply; 6+ messages in thread
From: Jes Sorensen @ 2010-07-01 14:41 UTC (permalink / raw)
To: Avi Kivity; +Cc: kvm
On 07/01/10 16:38, Avi Kivity wrote:
> On 06/30/2010 05:27 PM, Jes.Sorensen@redhat.com wrote:
>> From: Jes Sorensen<Jes.Sorensen@redhat.com>
>>
>> MSR_P6_EVNTSEL0 and MSR_P6_PERFCTR0 are used to probe for the P6 PMU
>> for older family 6 CPUs, which is also the default in QEMU. Ie. per
>> default we get the noise of these warnings in dmesg, confusing users
>> for no reason.
>
> For the reason, see the comment above. The guest may be trying to do
> something with the counters and expect them to work. Without the
> warning we'd have no idea we are knowningly misemulating something.
Saw it, which is why I only suggest we remove EVNTSEL0 and PERFCTR0 but
not the others. If the guest is expecting normal operation it is likely
to use more than just the first.
People are reporting these triggering in dmesg for both Linux and
Windows guests btw.
We could put them so the two in question only trigger with a debug flag
or something like that?
Cheers,
Jes
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Remove MSR_P6_{EVNTSEL0,PERFCTR0} from printk warning list.
2010-07-01 14:41 ` Jes Sorensen
@ 2010-07-01 14:44 ` Avi Kivity
2010-07-01 14:47 ` Jes Sorensen
0 siblings, 1 reply; 6+ messages in thread
From: Avi Kivity @ 2010-07-01 14:44 UTC (permalink / raw)
To: Jes Sorensen; +Cc: kvm
On 07/01/2010 05:41 PM, Jes Sorensen wrote:
> On 07/01/10 16:38, Avi Kivity wrote:
>
>> On 06/30/2010 05:27 PM, Jes.Sorensen@redhat.com wrote:
>>
>>> From: Jes Sorensen<Jes.Sorensen@redhat.com>
>>>
>>> MSR_P6_EVNTSEL0 and MSR_P6_PERFCTR0 are used to probe for the P6 PMU
>>> for older family 6 CPUs, which is also the default in QEMU. Ie. per
>>> default we get the noise of these warnings in dmesg, confusing users
>>> for no reason.
>>>
>> For the reason, see the comment above. The guest may be trying to do
>> something with the counters and expect them to work. Without the
>> warning we'd have no idea we are knowningly misemulating something.
>>
> Saw it, which is why I only suggest we remove EVNTSEL0 and PERFCTR0 but
> not the others. If the guest is expecting normal operation it is likely
> to use more than just the first.
>
Why is that?
> People are reporting these triggering in dmesg for both Linux and
> Windows guests btw.
>
> We could put them so the two in question only trigger with a debug flag
> or something like that?
>
What values are the guests writing? Are they really expecting this
thing to work?
What would it take to emulate those counters? They're supposed to be
relatively simple, no?
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Remove MSR_P6_{EVNTSEL0,PERFCTR0} from printk warning list.
2010-07-01 14:44 ` Avi Kivity
@ 2010-07-01 14:47 ` Jes Sorensen
2010-07-01 15:02 ` Avi Kivity
0 siblings, 1 reply; 6+ messages in thread
From: Jes Sorensen @ 2010-07-01 14:47 UTC (permalink / raw)
To: Avi Kivity; +Cc: kvm
On 07/01/10 16:44, Avi Kivity wrote:
> On 07/01/2010 05:41 PM, Jes Sorensen wrote:
>> Saw it, which is why I only suggest we remove EVNTSEL0 and PERFCTR0 but
>> not the others. If the guest is expecting normal operation it is likely
>> to use more than just the first.
>
> Why is that?
Depends on usage obviously.
>> People are reporting these triggering in dmesg for both Linux and
>> Windows guests btw.
>>
>> We could put them so the two in question only trigger with a debug flag
>> or something like that?
>>
>
> What values are the guests writing? Are they really expecting this
> thing to work?
>
> What would it take to emulate those counters? They're supposed to be
> relatively simple, no?
>
Sometimes just 0x00, other times more advanced values. I'll have to dig
into the manuals to figure out what it is:
kvm: 9480: cpu0 unimplemented perfctr wrmsr: 0x186 data 0x130079
kvm: 9480: cpu0 unimplemented perfctr wrmsr: 0xc1 data 0xffd7698c
kvm: 9480: cpu0 unimplemented perfctr wrmsr: 0x186 data 0x530079
kvm: 23682: cpu0 unimplemented perfctr wrmsr: 0x186 data 0x130079
kvm: 23682: cpu0 unimplemented perfctr wrmsr: 0xc1 data 0xffd7699c
kvm: 23682: cpu0 unimplemented perfctr wrmsr: 0x186 data 0x530079
I'll try and figure out what it is.
Cheers,
Jes
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Remove MSR_P6_{EVNTSEL0,PERFCTR0} from printk warning list.
2010-07-01 14:47 ` Jes Sorensen
@ 2010-07-01 15:02 ` Avi Kivity
0 siblings, 0 replies; 6+ messages in thread
From: Avi Kivity @ 2010-07-01 15:02 UTC (permalink / raw)
To: Jes Sorensen; +Cc: kvm
On 07/01/2010 05:47 PM, Jes Sorensen wrote:
> On 07/01/10 16:44, Avi Kivity wrote:
>
>> On 07/01/2010 05:41 PM, Jes Sorensen wrote:
>>
>>> Saw it, which is why I only suggest we remove EVNTSEL0 and PERFCTR0 but
>>> not the others. If the guest is expecting normal operation it is likely
>>> to use more than just the first.
>>>
>> Why is that?
>>
> Depends on usage obviously.
>
>
>>> People are reporting these triggering in dmesg for both Linux and
>>> Windows guests btw.
>>>
>>> We could put them so the two in question only trigger with a debug flag
>>> or something like that?
>>>
>>>
>> What values are the guests writing? Are they really expecting this
>> thing to work?
>>
>> What would it take to emulate those counters? They're supposed to be
>> relatively simple, no?
>>
>>
> Sometimes just 0x00, other times more advanced values. I'll have to dig
> into the manuals to figure out what it is:
>
> kvm: 9480: cpu0 unimplemented perfctr wrmsr: 0x186 data 0x130079
> kvm: 9480: cpu0 unimplemented perfctr wrmsr: 0xc1 data 0xffd7698c
> kvm: 9480: cpu0 unimplemented perfctr wrmsr: 0x186 data 0x530079
> kvm: 23682: cpu0 unimplemented perfctr wrmsr: 0x186 data 0x130079
> kvm: 23682: cpu0 unimplemented perfctr wrmsr: 0xc1 data 0xffd7699c
> kvm: 23682: cpu0 unimplemented perfctr wrmsr: 0x186 data 0x530079
>
> I'll try and figure out what it is.
>
Looks like it plays with the enable bit (22). We can ignore writes that
have bit 22 clear (as long as we remember the contents for a subsequent
rdmsr), but we can't just ignore something that's supposed to cause the
hardware to do something.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-07-01 15:02 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-30 14:27 [PATCH] Remove MSR_P6_{EVNTSEL0,PERFCTR0} from printk warning list Jes.Sorensen
2010-07-01 14:38 ` Avi Kivity
2010-07-01 14:41 ` Jes Sorensen
2010-07-01 14:44 ` Avi Kivity
2010-07-01 14:47 ` Jes Sorensen
2010-07-01 15:02 ` Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox