All of lore.kernel.org
 help / color / mirror / Atom feed
* [kvm-unit-tests PATCH] pmu_lbr: drop check for MSR_LBR_TOS != 0
@ 2024-10-02 23:56 Maxim Levitsky
  2024-11-03 21:06 ` Maxim Levitsky
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Maxim Levitsky @ 2024-10-02 23:56 UTC (permalink / raw)
  To: kvm; +Cc: Paolo Bonzini, Maxim Levitsky

While this is not likely, it is valid for the MSR_LBR_TOS
to contain 0 value, after a test which issues a series of branches, if the
number of branches recorded was divisible by the number of LBR msrs.

This unfortunately depends on the compiler, the number of LBR registers,
and it is not even deterministic between different runs of the test,
because interrupts, rescheduling, and various other events can affect total
number of branches done.

Therefore drop the check, instead of trying to fix it.

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
---
 x86/pmu_lbr.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/x86/pmu_lbr.c b/x86/pmu_lbr.c
index c6f010847..8ca8ed044 100644
--- a/x86/pmu_lbr.c
+++ b/x86/pmu_lbr.c
@@ -98,7 +98,6 @@ int main(int ac, char **av)
 	lbr_test();
 	wrmsr(MSR_IA32_DEBUGCTLMSR, 0);
 
-	report(rdmsr(MSR_LBR_TOS) != 0, "The guest LBR MSR_LBR_TOS value is good.");
 	for (i = 0; i < max; ++i) {
 		if (!rdmsr(lbr_to + i) || !rdmsr(lbr_from + i))
 			break;
-- 
2.26.3


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

end of thread, other threads:[~2025-02-24 17:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-02 23:56 [kvm-unit-tests PATCH] pmu_lbr: drop check for MSR_LBR_TOS != 0 Maxim Levitsky
2024-11-03 21:06 ` Maxim Levitsky
2024-11-22  1:33   ` Maxim Levitsky
2024-12-14  0:18     ` Maxim Levitsky
2025-02-19  0:06 ` Maxim Levitsky
2025-02-19  0:45   ` Sean Christopherson
2025-02-24 17:23 ` Sean Christopherson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.