Re: GPF in intel_pmu_lbr_reset() with qemu -cpu host

From: Paolo Bonzini
Date: Sat Mar 22 2014 - 03:54:34 EST


Il 21/03/2014 20:09, H. Peter Anvin ha scritto:
Calling this a bug in the PMU code is ridiculous. If KVM tells the
system it os a specific vendor-family-model-stepping but diverges in
behavior then it, by definition, is broken.

Yeah, this is true. On AMD there is processor support for virtualizing LBR, but Intel doesn't have it. I'm not sure if generic load/save MSR support could be used to do it.

Unfortunately, LBR does not have any CPUID bit to show its presence, unlike a lot of other perf-related features. So, even though calling it a bug in perf code is an exaggeration, using rdmsr_safe makes sense.

Paolo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/