From: Avi Kivity <avi@redhat.com>
To: "Yan, Zheng" <zheng.z.yan@linux.intel.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
Pekka Enberg <penberg@kernel.org>,
Sasha Levin <levinsasha928@gmail.com>,
Asias He <asias.hejun@gmail.com>,
Cyrill Gorcunov <gorcunov@gmail.com>, Ingo Molnar <mingo@elte.hu>,
KVM General <kvm@vger.kernel.org>, Gleb Natapov <gleb@redhat.com>
Subject: Re: perf uncore & lkvm woes
Date: Mon, 20 Aug 2012 11:49:48 +0300 [thread overview]
Message-ID: <5031FA2C.2060306@redhat.com> (raw)
In-Reply-To: <5031B9C9.5020401@linux.intel.com>
On 08/20/2012 07:15 AM, Yan, Zheng wrote:
> On 08/19/2012 05:55 PM, Avi Kivity wrote:
>> On 08/17/2012 09:56 AM, Peter Zijlstra wrote:
>>> On Fri, 2012-08-17 at 09:40 +0800, Yan, Zheng wrote:
>>>>
>>>> Peter, do I need to submit a patch disables uncore on virtualized CPU?
>>>>
>>> I think Avi prefers the method where KVM 'fakes' the MSRs and we have to
>>> detect if the MSRs actually work or not.
>>
>> s/we have/we don't have/.
>>
>>>
>>> If you're willing to have a go at that, please do so. If you're not sure
>>> how to do the KVM part, I'm sure Avi and/or Gleb can help you out.
>>
>> Certainly, please see kvm_pmu_get_msr() and kvm_pmu_set_msr().
>>
>> The approach is that if an msr write can be emulated correctly (for
>> example, it disables a counter) then we let it proceed; if it cannot be
>> emulated correctly (for example it enables a counter that we cannot
>> emulate), then we ignore it, but print out a message that tells the user
>> that we're faking something that may cause the guest to malfunction.
>>
>
> There is only one kvm_pmu structure in struct kvm_vcpu_arch, but the uncore
> driver may define dozens of PMUs. Besides the uncore PMUs make extensive use
> of extra registers, I don't think we can store these information in kvm_pmu
> structure.
We don't need to store any information, just respond to those MSRs (and
ignore them).
> The uncore pmu collects system-wide events on a given socket, it may not be
> possible to be simulated by virtualized CPU. I think it's better to just
> disable uncore on virtualized CPU.
That only works for Linux guests.
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2012-08-20 8:50 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-16 7:01 perf uncore & lkvm woes Pekka Enberg
2012-08-16 7:07 ` Cyrill Gorcunov
2012-08-16 7:16 ` Cyrill Gorcunov
2012-08-16 7:16 ` Pekka Enberg
2012-08-16 7:19 ` Peter Zijlstra
2012-08-16 7:38 ` Yan, Zheng
2012-08-16 7:41 ` Pekka Enberg
2012-08-16 7:46 ` Cyrill Gorcunov
2012-08-16 8:45 ` Avi Kivity
2012-08-16 9:06 ` Cyrill Gorcunov
2012-08-16 9:23 ` Pekka Enberg
2012-08-16 8:40 ` Avi Kivity
2012-08-16 11:06 ` Avi Kivity
2012-08-16 11:17 ` Peter Zijlstra
2012-08-16 11:25 ` Avi Kivity
2012-08-17 1:40 ` Yan, Zheng
2012-08-17 6:56 ` Peter Zijlstra
2012-08-19 9:55 ` Avi Kivity
2012-08-20 4:15 ` Yan, Zheng
2012-08-20 8:49 ` Avi Kivity [this message]
2012-08-21 1:11 ` Yan, Zheng
2012-08-21 8:32 ` Avi Kivity
2012-08-21 9:07 ` Yan, Zheng
2012-08-20 5:30 ` Yan, Zheng
2012-08-20 8:48 ` Avi Kivity
2012-08-21 7:11 ` Peter Zijlstra
2012-08-21 8:34 ` Avi Kivity
2012-08-21 10:35 ` Peter Zijlstra
2012-08-22 8:53 ` Avi Kivity
2012-08-16 14:28 ` David Ahern
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5031FA2C.2060306@redhat.com \
--to=avi@redhat.com \
--cc=a.p.zijlstra@chello.nl \
--cc=asias.hejun@gmail.com \
--cc=gleb@redhat.com \
--cc=gorcunov@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=levinsasha928@gmail.com \
--cc=mingo@elte.hu \
--cc=penberg@kernel.org \
--cc=zheng.z.yan@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).