[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140714124812.GW9918@twins.programming.kicks-ass.net>
Date: Mon, 14 Jul 2014 14:48:12 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Paolo Bonzini <pbonzini@...hat.com>
Cc: kan.liang@...el.com, andi@...stfloor.org,
linux-kernel@...r.kernel.org, kvm@...r.kernel.org
Subject: Re: [PATCH V5 1/2] perf ignore LBR and extra_regs
On Mon, Jul 14, 2014 at 02:40:33PM +0200, Paolo Bonzini wrote:
> Hmmm, I thought rdmsr_safe was going to return zero, but it just returns
> whatever happened to be in edx:eax which maybe should also be fixed.
>
> Kan Liang, what happens if CONFIG_PARAVIRT=y? Do you get garbage or just no
> events reported?
Either way; its not functioning according to 'spec'. Therefore we should
'disable' things.
> >>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?
> , 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.
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists