Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1409946
| From | Paolo Bonzini <pbonzini@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] KVM: Handle MSR_IA32_PERF_CTL |
| Date | 2016-05-31 10:00 +0200 |
| Message-ID | <rEMKJ-8eR-1@gated-at.bofh.it> (permalink) |
| References | (1 earlier) <rDaet-2yj-11@gated-at.bofh.it> <rDaoa-2BP-9@gated-at.bofh.it> <rDrS2-59z-29@gated-at.bofh.it> <rDrS2-59z-27@gated-at.bofh.it> <rDs1H-5cE-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
> 2016-05-27 17:22+0200, Radim Krčmář:
> > (I wonder why MacOS X doesn't read IA32_PERF_STATUS, though.)
>
> Oh, it maybe does ... we already emulate status and return 0x1000 in its
> bottom 16 bits. I have no idea what is that supposed to mean, but I
> think we should return 0x1000 in IA32_PERF_CTL then.
It's 1000, not 0x1000 (instead, on real hardware the value is typically a
multiple of 256). It was added for Darwin too.
Returning different values is okay, because they are different on real
hardware too:
(sudo dd if=/dev/cpu/0/msr skip=$((0x198)) iflag=skip_bytes bs=8 count=1;
sudo dd if=/dev/cpu/0/msr skip=$((0x199)) iflag=skip_bytes bs=8 count=1) | od -tx8
0000000 00001f3900001100 0000000000001300
^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^
PERF_STATUS PERF_CTL
And perhaps if we returned non-zero values for PERF_CTL Darwin would try to
write to it. So returning zero is fine, I think. There is no correct answer...
Paolo
> (Would be nice to understand how that 0x1000 happened ... we might want
> 0 in both.)
>
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] KVM: Handle MSR_IA32_PERF_CTL kmeaw@yandex-team.ru - 2016-05-26 09:50 +0200
Re: [PATCH] KVM: Handle MSR_IA32_PERF_CTL Radim Krčmář <rkrcmar@redhat.com> - 2016-05-26 22:40 +0200
Re: [PATCH] KVM: Handle MSR_IA32_PERF_CTL "Gabriel L. Somlo" <gsomlo@gmail.com> - 2016-05-26 22:50 +0200
Re: [PATCH] KVM: Handle MSR_IA32_PERF_CTL Radim Krčmář <rkrcmar@redhat.com> - 2016-05-27 17:30 +0200
Re: [PATCH] KVM: Handle MSR_IA32_PERF_CTL Radim Krčmář <rkrcmar@redhat.com> - 2016-05-27 17:40 +0200
Re: [PATCH] KVM: Handle MSR_IA32_PERF_CTL Paolo Bonzini <pbonzini@redhat.com> - 2016-05-31 10:00 +0200
Re: [PATCH] KVM: Handle MSR_IA32_PERF_CTL Radim Krčmář <rkrcmar@redhat.com> - 2016-05-31 15:10 +0200
Re: [PATCH v3] KVM: Handle MSR_IA32_PERF_CTL Radim Krčmář <rkrcmar@redhat.com> - 2016-05-31 15:20 +0200
[PATCH] KVM: Handle MSR_IA32_PERF_CTL Dmitry Bilunov <kmeaw@yandex-team.ru> - 2016-05-31 16:50 +0200
Re: [PATCH] KVM: Handle MSR_IA32_PERF_CTL Radim Krčmář <rkrcmar@redhat.com> - 2016-05-31 17:00 +0200
Re: [PATCH] KVM: Handle MSR_IA32_PERF_CTL Radim Krčmář <rkrcmar@redhat.com> - 2016-05-27 17:30 +0200
csiph-web