From: Paolo Bonzini <pbonzini@redhat.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: kan.liang@intel.com, andi@firstfloor.org,
linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Subject: Re: [PATCH V5 1/2] perf ignore LBR and extra_regs
Date: Mon, 14 Jul 2014 15:47:18 +0200 [thread overview]
Message-ID: <53C3DF66.5070102@redhat.com> (raw)
In-Reply-To: <20140714124812.GW9918@twins.programming.kicks-ass.net>
Il 14/07/2014 14:48, Peter Zijlstra ha scritto:
>>>> In fact there's no reason why LBR cannot be virtualized (though it does need
>>>> support from the processor), and it may even be possible to support
>>>> OFFCORE_RSP_X in the KVM virtual PMU.
>>>
>>> But its not, so something needs to be done, right?
>>
>> A first thing that could be done, is to have a way for the kernel to detect
>> absence of LBR
>
> Which is exactly what this patch does, no?
A documented (and recommended) way for the kernel to detect it is
superior though...
>> , for example an all-1s setting of the LBR format field of
>> IA32_PERF_CAPABILITIES. If Intel can tell us "all 1s will never be used",
>> we can have KVM set the field that way. The kernel then should disable LBR.
>
> So what's wrong with testing if the MSRs that provide LBR actually work
> or not? That doesn't require any magic co-operation of the host/vm
> machinery and is therefore far more robust.
... because the difference is that whenever we hack the kernel, Windows
and vTune will remain broken forever. Whenever we get Intel to make the
hack part of the spec, there is some hope that Windows and vTune will
eventually get fixed.
The hack certainly works, I'm not disputing that.
Paolo
next prev parent reply other threads:[~2014-07-14 13:47 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-10 10:59 [PATCH V5 1/2] perf ignore LBR and extra_regs kan.liang
2014-07-10 10:59 ` [PATCH V5 2/2] kvm: ignore LBR and extra_reg kan.liang
2014-07-14 10:53 ` [PATCH V5 1/2] perf ignore LBR and extra_regs Peter Zijlstra
2014-07-14 14:28 ` Liang, Kan
2014-07-14 16:28 ` Peter Zijlstra
2014-07-14 11:08 ` Peter Zijlstra
2014-07-14 11:55 ` Paolo Bonzini
2014-07-14 12:09 ` Peter Zijlstra
2014-07-14 12:40 ` Paolo Bonzini
2014-07-14 12:48 ` Peter Zijlstra
2014-07-14 13:47 ` Paolo Bonzini [this message]
2014-07-14 13:36 ` Liang, Kan
2014-07-14 13:40 ` Paolo Bonzini
2014-07-14 13:44 ` Liang, Kan
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=53C3DF66.5070102@redhat.com \
--to=pbonzini@redhat.com \
--cc=andi@firstfloor.org \
--cc=kan.liang@intel.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
/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