public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* Question: 'pmu' kvm unit test fails when run nested with NMI watchdog on the host
@ 2025-11-05 20:29 mlevitsk
  2025-11-10 19:51 ` mlevitsk
  2026-02-25  1:07 ` Sean Christopherson
  0 siblings, 2 replies; 6+ messages in thread
From: mlevitsk @ 2025-11-05 20:29 UTC (permalink / raw)
  To: kvm; +Cc: Sean Christopherson

Hi,

I have a small, a bit philosophical question about the pmu kvm unit test:

One of the subtests of this test, tests all GP counters at once, and it depends on the NMI watchdog being disabled,
because it occupies one GP counter.

This works fine, except when this test is run nested. In this case, assuming that the host has the NMI watchdog enabled,
the L1 still can’t use all counters and has no way of working this around.

Since AFAIK the current long term direction is vPMU, which is especially designed to address those kinds of issues,
I am not sure it is worthy to attempt to fix this at L0 level (by reducing the number of counters that the guest can see for example,
which also won’t always fix the issue, since there could be more perf users on the host, and NMI watchdog can also
get dynamically enabled and disabled).

My question is: Since the test fails and since it interferes with CI, does it make sense to add a workaround to the test,
by making it use 1 counter less if run nested? 

As a bonus the test can also check the NMI watchdog state and also reduce the number of tested counters instead of being skipped,
improving coverage.

Does all this make sense? If not, what about making the ‘all_counters’ testcase optional (only print a warning) in case the test is run nested?

Best regards,
	Maxim Levitsky


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-02-25 16:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-05 20:29 Question: 'pmu' kvm unit test fails when run nested with NMI watchdog on the host mlevitsk
2025-11-10 19:51 ` mlevitsk
2025-11-26 18:14   ` mlevitsk
2026-02-10 15:23     ` mlevitsk
2026-02-25  1:07 ` Sean Christopherson
2026-02-25 16:02   ` mlevitsk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox