PMIs are raised on counter overflow irrespective of whether the guest PMU has a global status MSR (PMU version > 1). Hence, always test for PMI arrival as part of the overflow tests. Fixes: 62ba50365a98 ("x86/pmu: Add global helpers to cover Intel Arch PMU Version 1") Signed-off-by: Sandipan Das --- x86/pmu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x86/pmu.c b/x86/pmu.c index b262ea59..22728650 100644 --- a/x86/pmu.c +++ b/x86/pmu.c @@ -592,6 +592,8 @@ static void check_counter_overflow(void) else report(cnt.count == 0xffffffffffff || cnt.count < 7, "cntr-%d", i); + report(check_irq() == (i % 2), "irq-%d", i); + if (!this_cpu_has_perf_global_status()) continue; @@ -600,7 +602,6 @@ static void check_counter_overflow(void) wrmsr(pmu.msr_global_status_clr, status); status = rdmsr(pmu.msr_global_status); report(!(status & (1ull << idx)), "status clear-%d", i); - report(check_irq() == (i % 2), "irq-%d", i); } report_prefix_pop(); -- 2.53.0