lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 24 May 2012 19:11:28 +0200
From:	Stephane Eranian <eranian@...gle.com>
To:	David Ahern <dsahern@...il.com>
Cc:	Peter Zijlstra <peterz@...radead.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Gleb Natapov <gleb@...hat.com>, Avi Kivity <avi@...hat.com>
Subject: Re: perf, x86: only do lbr init if bts is available

On Thu, May 24, 2012 at 6:41 PM, David Ahern <dsahern@...il.com> wrote:
> On 5/24/12 10:35 AM, Stephane Eranian wrote:
>>
>> Well, no. There is no connection between BTS and LBR and you're creating
>> one.
>
>
> Ok. That was not clear to me from skimming the manual.
> Then should it be tied to X86_FEATURE_DTES64?
>
No, it is unrelated to the Debug Store.
There is really nothing you can use to figure that out, not event IA32_DEBUGCTL.
I wish Intel had something in PERF_CAPABILITIES, but LBR was
originally considered
as a debug feature, I think. To the point that it is described in the
debug section not in
vol 3b with performance monitoring.

> diff --git a/arch/x86/kernel/cpu/perf_event_intel_lbr.c
> b/arch/x86/kernel/cpu/perf_event_intel_lbr.c
> index 520b426..1090ae6 100644
> --- a/arch/x86/kernel/cpu/perf_event_intel_lbr.c
> +++ b/arch/x86/kernel/cpu/perf_event_intel_lbr.c
> @@ -640,6 +640,9 @@ void intel_pmu_lbr_init_core(void)
>  /* nehalem/westmere */
>  void intel_pmu_lbr_init_nhm(void)
>  {
> +   if (!boot_cpu_has(X86_FEATURE_DTES64))
> +       return;
> +
>    x86_pmu.lbr_nr     = 16;
>    x86_pmu.lbr_tos    = MSR_LBR_TOS;
>    x86_pmu.lbr_from   = MSR_LBR_NHM_FROM;
>
>
>
>> Where is the wrmsr coming from? What we need to do is ensure that LBR is
>> not
>> touched if we don't actually use it.
>
>
> e.g., intel_pmu_lbr_init_nhm sets up lbr_nr, lbr_from, lbr_to and from, etc.
> Fhat I can tell intel_pmu_lbr_reset() gets invoked some where during the VM
> boot; I haven't traced how/when yet.
>
> David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ