[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <53C3DF66.5070102@redhat.com>
Date: Mon, 14 Jul 2014 15:47:18 +0200
From: Paolo Bonzini <pbonzini@...hat.com>
To: Peter Zijlstra <peterz@...radead.org>
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
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
--
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