From: Maxim Levitsky <mlevitsk@redhat.com>
To: kvm@vger.kernel.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Maxim Levitsky <mlevitsk@redhat.com>
Subject: [kvm-unit-tests PATCH] pmu_lbr: drop check for MSR_LBR_TOS != 0
Date: Wed, 2 Oct 2024 19:56:58 -0400 [thread overview]
Message-ID: <20241002235658.215903-1-mlevitsk@redhat.com> (raw)
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
next reply other threads:[~2024-10-02 23:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-02 23:56 Maxim Levitsky [this message]
2024-11-03 21:06 ` [kvm-unit-tests PATCH] pmu_lbr: drop check for MSR_LBR_TOS != 0 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241002235658.215903-1-mlevitsk@redhat.com \
--to=mlevitsk@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.