Re: [PATCH V2 2/3] perf protect LBR when Intel PT is enabled.

From: Peter Zijlstra
Date: Thu Jul 03 2014 - 03:33:33 EST


On Wed, Jul 02, 2014 at 11:14:14AM -0700, kan.liang@xxxxxxxxx wrote:
> From: Kan Liang <kan.liang@xxxxxxxxx>
>
> If RTIT_CTL.TraceEn=1, any attempt to read or write the LBR or LER MSRs, including LBR_TOS, will result in a #GP.
> Since Intel PT can be enabled/disabled at runtime, LBR MSRs have to be protected by _safe() at runtime.

Lines are too long, and the reasoning is totally broken.

If there's active LBR users out there, we should refuse to enable PT and
vice versa. What we should not be doing is using _safe and fault and
generate crap.

Attachment: pgp8_nmkDfjzn.pgp
Description: PGP signature