RE: [PATCH 1/1] perf/x86/intel: Add extended event constraints for Knights Landing

From: Odzioba, Lukasz
Date: Mon Jun 20 2016 - 06:30:52 EST


On 08.06.2016 Peter Zijlstra wrote:
> How does this work in the light of intel_alt_er() ?

Hi Peter,

If the constrained bit is valid on only one of the OCR MSRs (like in case of KNL),
then OCR valid mask will forbid altering it by the other MSR in intel_alt_er.

If constrained bit is valid on both OCR MSR, so it can be safely altered by
intel_alt_er, but in this case it should be defined twice - for each MSR i.e:

INTEL_EEVENT_CONSTRAINT(0x01b7, 0, 0x1); // bit0 can be used only on PMC0
INTEL_EEVENT_CONSTRAINT(0x02b7, 0, 0x1); // bit0 can be used only on PMC0

I hope that answers your question.

Thanks,
Lukas