Bug 1346730
| Summary: | libvirt will enable perf event which user want disable it | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Luyao Huang <lhuang> |
| Component: | libvirt | Assignee: | Peter Krempa <pkrempa> |
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 7.3 | CC: | fjin, pkrempa, rbalakri, yalzhang |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | libvirt-2.0.0-1.el7 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-11-03 18:47:15 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Luyao Huang
2016-06-15 09:10:21 UTC
Fixed upstream:
commit da8285c44a1db7b3ee85920a08dc80a133254c49
Author: Peter Krempa <pkrempa>
Date: Wed Jun 15 16:07:20 2016 +0200
qemu: perf: Don't set state of first event for every other event
A bug in the code used the value of the first perf event as state for
all the mentioned one rather than extracting individual ones.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1346730
verified on libvirt-2.0.0-1.el7.x86_64, the result is as expected.
1. guest is shutdown
# virsh dumpxml rhel7.2 | grep /perf -B4
<perf>
<event name='cmt' enabled='no'/>
<event name='mbmt' enabled='no'/>
<event name='mbml' enabled='no'/>
</perf>
# virsh perf rhel7.2
cmt : disabled
mbmt : disabled
mbml : disabled
# virsh perf rhel7.2 --disable cmt --enable mbml
# virsh perf rhel7.2
cmt : disabled
mbmt : disabled
mbml : enabled
# virsh perf rhel7.2 --enable cmt,mbmt
# virsh perf rhel7.2
cmt : enabled
mbmt : enabled
mbml : enabled
# virsh dumpxml rhel7.2 | grep /perf -B4
<perf>
<event name='cmt' enabled='yes'/>
<event name='mbmt' enabled='yes'/>
<event name='mbml' enabled='yes'/>
</perf>
Unexpected error occur when disable some event which is already disabled while the guest is running. Test on libvirt-2.0.0-1.el7.x86_64 1.When disable some event which is already disabled, it will report error. # virsh start rhel7.2 Domain rhel7.2 started # virsh perf rhel7.2 cmt : disabled mbmt : disabled mbml : disabled # virsh perf rhel7.2 --disable cmt error: Unable to enable/disable perf events error: Unable to disable perf event type=0: Bad file descriptor # virsh perf rhel7.2 --disable mbmt error: Unable to enable/disable perf events error: Unable to disable perf event type=1: Bad file descriptor # virsh perf rhel7.2 --disable mbml error: Unable to enable/disable perf events error: Unable to disable perf event type=2: Bad file descriptor 2. When combine enable and disable, the --enable part succeed, but the --disable part report error. # virsh start rhel7.2 Domain rhel7.2 started # virsh perf rhel7.2 cmt : disabled mbmt : disabled mbml : disabled # virsh perf rhel7.2 --enable mbmt --disable cmt error: Unable to enable/disable perf events error: Unable to disable perf event type=0: Bad file descriptor # virsh perf rhel7.2 cmt : disabled mbmt : enabled mbml : disabled # virsh perf rhel7.2 --enable mbml --disable cmt error: Unable to enable/disable perf events error: Unable to disable perf event type=0: Bad file descriptor # virsh perf rhel7.2 cmt : disabled mbmt : enabled mbml : enabled follow peter's suggestion to move the comment 4 to https://bugzilla.redhat.com/show_bug.cgi?id=1360533#c3 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHSA-2016-2577.html |