From: bugzilla-daemon@kernel.org
To: kvm@vger.kernel.org
Subject: [Bug 218739] pmu_counters_test kvm-selftest fails with (count != NUM_INSNS_RETIRED)
Date: Tue, 23 Apr 2024 00:21:14 +0000 [thread overview]
Message-ID: <bug-218739-28872-Az6xyuo5LH@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-218739-28872@https.bugzilla.kernel.org/>
https://bugzilla.kernel.org/show_bug.cgi?id=218739
Dongli Zhang (dongli.zhang@oracle.com) changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dongli.zhang@oracle.com
--- Comment #1 from Dongli Zhang (dongli.zhang@oracle.com) ---
Perhaps more information can be printed by pmu_counters_test in the future,
e.g., msr, msr_ctrl, their values, cflush and whether forced emulation?
Just from the output, the number of instructions by GUEST_MEASURE_EVENT() does
not match with NUM_INSNS_RETIRED=17,
------------------------
I have tried on an Icelake server and I could not reproduce anything for most
of times, except the below for only once.
# ./pmu_counters_test
Testing arch events, PMU version 0, perf_caps = 0
Testing GP counters, PMU version 0, perf_caps = 0
Testing fixed counters, PMU version 0, perf_caps = 0
Testing arch events, PMU version 0, perf_caps = 2000
Testing GP counters, PMU version 0, perf_caps = 2000
Testing fixed counters, PMU version 0, perf_caps = 2000
Testing arch events, PMU version 1, perf_caps = 0
Testing GP counters, PMU version 1, perf_caps = 0
Testing fixed counters, PMU version 1, perf_caps = 0
Testing arch events, PMU version 1, perf_caps = 2000
Testing GP counters, PMU version 1, perf_caps = 2000
Testing fixed counters, PMU version 1, perf_caps = 2000
Testing arch events, PMU version 2, perf_caps = 0
Testing GP counters, PMU version 2, perf_caps = 0
Testing fixed counters, PMU version 2, perf_caps = 0
Testing arch events, PMU version 2, perf_caps = 2000
Testing GP counters, PMU version 2, perf_caps = 2000
Testing fixed counters, PMU version 2, perf_caps = 2000
Testing arch events, PMU version 3, perf_caps = 0
Testing GP counters, PMU version 3, perf_caps = 0
Testing fixed counters, PMU version 3, perf_caps = 0
Testing arch events, PMU version 3, perf_caps = 2000
Testing GP counters, PMU version 3, perf_caps = 2000
Testing fixed counters, PMU version 3, perf_caps = 2000
Testing arch events, PMU version 4, perf_caps = 0
==== Test Assertion Failure ====
x86_64/pmu_counters_test.c:120: count != 0
pid=39696 tid=39696 errno=4 - Interrupted system call
1 0x0000000000402baf: run_vcpu at pmu_counters_test.c:61
2 0x0000000000402ddd: test_arch_events at pmu_counters_test.c:307
3 0x0000000000402683: test_arch_events at pmu_counters_test.c:605
4 (inlined by) test_intel_counters at pmu_counters_test.c:605
5 (inlined by) main at pmu_counters_test.c:635
6 0x00007fcfeb43ae44: ?? ??:0
7 0x000000000040288d: _start at ??:?
0x0 == 0x0 (count == 0)
# cat /sys/module/kvm/parameters/enable_pmu
Y
# cat /sys/module/kvm/parameters/force_emulation_prefix
0
# cpuid -l 0xa -1
CPU:
Architecture Performance Monitoring Features (0xa):
version ID = 0x5 (5)
number of counters per logical processor = 0x8 (8)
bit width of counter = 0x30 (48)
length of EBX bit vector = 0x8 (8)
core cycle event = available
instruction retired event = available
reference cycles event = available
last-level cache ref event = available
last-level cache miss event = available
branch inst retired event = available
branch mispred retired event = available
top-down slots event = available
fixed counter 0 supported = true
fixed counter 1 supported = true
fixed counter 2 supported = true
fixed counter 3 supported = true
fixed counter 4 supported = false
fixed counter 5 supported = false
fixed counter 6 supported = false
fixed counter 7 supported = false
fixed counter 8 supported = false
fixed counter 9 supported = false
fixed counter 10 supported = false
fixed counter 11 supported = false
fixed counter 12 supported = false
fixed counter 13 supported = false
fixed counter 14 supported = false
fixed counter 15 supported = false
fixed counter 16 supported = false
fixed counter 17 supported = false
fixed counter 18 supported = false
fixed counter 19 supported = false
fixed counter 20 supported = false
fixed counter 21 supported = false
fixed counter 22 supported = false
fixed counter 23 supported = false
fixed counter 24 supported = false
fixed counter 25 supported = false
fixed counter 26 supported = false
fixed counter 27 supported = false
fixed counter 28 supported = false
fixed counter 29 supported = false
fixed counter 30 supported = false
fixed counter 31 supported = false
number of contiguous fixed counters = 0x4 (4)
bit width of fixed counters = 0x30 (48)
anythread deprecation = true
-------------------------------------------
I also did tests on nested L1 hypervisor (more legacy hardware). Most of time
are good, except once.
# ./pmu_counters_test
Testing arch events, PMU version 0, perf_caps = 0
Testing GP counters, PMU version 0, perf_caps = 0
Testing fixed counters, PMU version 0, perf_caps = 0
Testing arch events, PMU version 0, perf_caps = 2000
Testing GP counters, PMU version 0, perf_caps = 2000
Testing fixed counters, PMU version 0, perf_caps = 2000
Testing arch events, PMU version 1, perf_caps = 0
Testing GP counters, PMU version 1, perf_caps = 0
Testing fixed counters, PMU version 1, perf_caps = 0
Testing arch events, PMU version 1, perf_caps = 2000
Testing GP counters, PMU version 1, perf_caps = 2000
Testing fixed counters, PMU version 1, perf_caps = 2000
Testing arch events, PMU version 2, perf_caps = 0
Testing GP counters, PMU version 2, perf_caps = 0
Testing fixed counters, PMU version 2, perf_caps = 0
Testing arch events, PMU version 2, perf_caps = 2000
Testing GP counters, PMU version 2, perf_caps = 2000
Testing fixed counters, PMU version 2, perf_caps = 2000
Testing arch events, PMU version 3, perf_caps = 0
==== Test Assertion Failure ====
x86_64/pmu_counters_test.c:120: count != 0
pid=9301 tid=9301 errno=4 - Interrupted system call
1 0x0000000000402bdf: run_vcpu at pmu_counters_test.c:61
2 0x0000000000402dfd: test_arch_events at pmu_counters_test.c:307
3 0x00000000004026a3: test_arch_events at pmu_counters_test.c:605
4 (inlined by) test_intel_counters at pmu_counters_test.c:605
5 (inlined by) main at pmu_counters_test.c:635
6 0x00007f05e2f60d8f: ?? ??:0
7 0x00007f05e2f60e3f: ?? ??:0
8 0x00000000004028b4: _start at ??:?
0x0 == 0x0 (count == 0)
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are watching the assignee of the bug.
next prev parent reply other threads:[~2024-04-23 0:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-17 14:29 [Bug 218739] New: pmu_counters_test kvm-selftest fails with (count != NUM_INSNS_RETIRED) bugzilla-daemon
2024-04-23 0:21 ` bugzilla-daemon [this message]
2024-05-27 18:19 ` [Bug 218739] " bugzilla-daemon
2024-05-28 17:20 ` Sean Christopherson
2024-05-28 17:20 ` bugzilla-daemon
2024-06-10 19:22 ` bugzilla-daemon
2024-06-20 21:28 ` bugzilla-daemon
2024-06-20 21:35 ` bugzilla-daemon
2024-06-21 15:14 ` bugzilla-daemon
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=bug-218739-28872-Az6xyuo5LH@https.bugzilla.kernel.org/ \
--to=bugzilla-daemon@kernel.org \
--cc=kvm@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox