Before adaptive PEBS v4, the PEBS record format is not determined by MSR_PEBS_DATA_CFG, but by IA32_PERF_CAPABILITIES.PEBS_FMT[11:8] (< 4), which is not covered by this unit test. We don't want additional implementation to support such legacy platforms, instead, we can exclude them from the test to avoid test failures. Technically, it seems checking IA32_PERF_CAPABILITIES.PEBS_BASELINE[14] is more reasonable. But this bit is not exposed to the guest in the current KVM emulated vPMU implementation, and if we use it as a filter, it will filter out all platforms. Signed-off-by: Zide Chen <zide.chen@xxxxxxxxx> Signed-off-by: Dapeng Mi <dapeng1.mi@xxxxxxxxxxxxxxx> Reviewed-by: Dapeng Mi <dapeng1.mi@xxxxxxxxxxxxxxx> --- x86/pmu_pebs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x86/pmu_pebs.c b/x86/pmu_pebs.c index 6b4a5ed3b91e..6396d51c6b49 100644 --- a/x86/pmu_pebs.c +++ b/x86/pmu_pebs.c @@ -404,8 +404,8 @@ int main(int ac, char **av) } else if (!pmu_has_pebs()) { report_skip("PEBS required PMU version 2, reported version is %d", pmu.version); return report_summary(); - } else if (!pmu_pebs_format()) { - report_skip("PEBS not enumerated in PERF_CAPABILITIES"); + } else if (pmu_pebs_format() < 4) { + report_skip("This test supports PEBS_Record_Format >= 4 only"); return report_summary(); } else if (rdmsr(MSR_IA32_MISC_ENABLE) & MSR_IA32_MISC_ENABLE_PEBS_UNAVAIL) { report_skip("PEBS unavailable according to MISC_ENABLE"); -- 2.34.1