RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1018691 - Case "pmu" in kvm unit test fails on RHEL6.5 host
Summary: Case "pmu" in kvm unit test fails on RHEL6.5 host
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.5
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Virtualization Maintenance
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-14 08:01 UTC by Shaolong Hu
Modified: 2014-01-08 12:34 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-10-14 13:48:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Shaolong Hu 2013-10-14 08:01:08 UTC
Description of problem:
--------------------------
I recently run kvm unit test (using run_tests.sh with default unittests.cfg) with upstream qemu on latest RHEL6.5 host, there are 3 cases get stuck, 2 cases fail.

I am not sure whether this is a kvm bug, or kvm unit test problem, or i run kvm unit test wrong, i only modify run_test.sh and x86_run script a little bit to separate log file for each case, and i use upstream qemu for i was told in RHEL6 testdev device in our internal version may not guarantee to work, so feel free to change the component or close if this is notabug.

BTW, the "-display none" command does not exists, i have to remove it from script or it shows all cases pass but don't run them at all.


Version-Release number of selected component (if applicable):
--------------------------------------------------------------
kernel 2.6.32-421.el6.x86_64
qemu: latest upstream
kvm unit test: latest upstream

host:

vendor_id	: GenuineIntel
cpu family	: 6
model		: 23
model name	: Intel(R) Core(TM)2 Quad CPU    Q9500  @ 2.83GHz


This bug is to track the "pmu" case, which fails, log:

qemu-system-x86_64 -enable-kvm -device testdev,chardev=testlog -chardev file,id=testlog,path=msr.out -serial stdio -kernel x86/pmu.flat -smp 1
VNC server running on `::1:5901'
enabling apic
paging enabled
cr0 = 80010011
cr3 = 7fff000
cr4 = 20
PMU version:         33
GP counters:         1
GP counter width:    0
Mask length:         0
Fixed counters:      1
Fixed counter width: 0
GP event 'core cycles' is disabled
GP event 'instructions' is disabled
GP event 'ref cycles' is disabled
GP event 'llc refference' is disabled
GP event 'llc misses' is disabled
GP event 'branches' is disabled
unhandled excecption 13
Return value from qemu: 7

Comment 1 Gleb Natapov 2013-10-14 13:48:22 UTC
(In reply to Shaolong Hu from comment #0)
> This bug is to track the "pmu" case, which fails, log:
> 
> qemu-system-x86_64 -enable-kvm -device testdev,chardev=testlog -chardev
> file,id=testlog,path=msr.out -serial stdio -kernel x86/pmu.flat -smp 1

You need to run it with -cpu host otherwise guest has no PMU.

Comment 2 Shaolong Hu 2013-10-18 02:59:22 UTC
# qemu-system-x86_64 -enable-kvm -device testdev,chardev=testlog -chardev file,id=testlog,path=msr.out -serial stdio -kernel x86/pmu.flat -smp 1 -cpu host
VNC server running on `::1:5900'
enabling apic
paging enabled
cr0 = 80010011
cr3 = 7fff000
cr4 = 20
PMU version:         2
GP counters:         2
GP counter width:    40
Mask length:         7
Fixed counters:      3
Fixed counter width: 40
PASS: pmu core cycles-0
PASS: pmu core cycles-1
PASS: pmu instructions-0
PASS: pmu instructions-1
PASS: pmu ref cycles-0
PASS: pmu ref cycles-1
PASS: pmu llc refference-0
PASS: pmu llc refference-1
PASS: pmu llc misses-0
PASS: pmu llc misses-1
PASS: pmu branches-0
PASS: pmu branches-1
PASS: pmu branch misses-0
PASS: pmu branch misses-1
PASS: pmu fixed-0
PASS: pmu fixed-1
PASS: pmu fixed-2
PASS: pmu rdpmc-0
PASS: pmu rdpmc fast-0
PASS: pmu rdpmc-1
PASS: pmu rdpmc fast-1
PASS: pmu rdpmc fixed-0
PASS: pmu rdpmc fixed fast-0
PASS: pmu rdpmc fixed-1
PASS: pmu rdpmc fixed fast-1
PASS: pmu rdpmc fixed-2
PASS: pmu rdpmc fixed fast-2
FAIL: pmu all counters-0
PASS: pmu overflow-0
PASS: pmu overflow status-0
PASS: pmu overflow status clear-0
PASS: pmu overflow irq-0
PASS: pmu overflow-1
PASS: pmu overflow status-1
PASS: pmu overflow status clear-1
PASS: pmu overflow irq-1
PASS: pmu overflow-2
PASS: pmu overflow status-2
PASS: pmu overflow status clear-2
PASS: pmu overflow irq-2
PASS: pmu cmask-0

41 tests, 1 failures

Comment 3 Shaolong Hu 2013-10-18 03:00:50 UTC
kvm unit test may need patch:

x86/unittests.cfg

[pmu]
file = pmu.flat
+ extra_params = -cpu host

Comment 4 Shaolong Hu 2013-10-18 04:10:27 UTC
Hi Gleb,

Could you have a look at the failure in comment 2 ?

Comment 5 Paolo Bonzini 2013-10-18 07:23:05 UTC
Did you have NMI watchdog enabled in the host?

Comment 6 Shaolong Hu 2013-10-18 08:39:09 UTC
(In reply to Paolo Bonzini from comment #5)
> Did you have NMI watchdog enabled in the host?

Yes, there is nmi count in /proc/interrupts, i think it is enabled by default.

Comment 7 Paolo Bonzini 2013-10-18 09:20:19 UTC
The NMI watchdog uses up a performance counter, and thus causes the all-counters test to fail.

Comment 8 Shaolong Hu 2013-10-18 09:26:38 UTC
(In reply to Paolo Bonzini from comment #7)
> The NMI watchdog uses up a performance counter, and thus causes the
> all-counters test to fail.

Thanks, all test pass.


Note You need to log in before you can comment on or make changes to this bug.