Bug 1177710

Summary: Command 'kvm_stat' couldn't be executecd on PPC rhel system
Product: Red Hat Enterprise Linux 7 Reporter: Gu Nini <ngu>
Component: qemu-kvm-rhevAssignee: David Gibson <dgibson>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.1CC: knoel, lmiksik, michen, qzhang, virt-maint, xuhan, ypu
Target Milestone: rc   
Target Release: ---   
Hardware: ppc64   
OS: Linux   
Whiteboard:
Fixed In Version: QEMU 2.2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-12-04 16:24:56 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 Gu Nini 2014-12-30 02:59:57 UTC
Description of problem:
When issue command 'kvm_stat' on the host, it failed with following error prompt:
[root@ibm-p8-kvm-01-qe ~]# kvm_stat
Traceback (most recent call last):
  File "/usr/bin/kvm_stat", line 196, in <module>
    filters[f] = (filters[f][0], invert(filters[f][1]))
  File "/usr/bin/kvm_stat", line 193, in invert
    return dict((x[1], x[0]) for x in d.iteritems())
AttributeError: 'NoneType' object has no attribute 'iteritems'

Version-Release number of selected component (if applicable):
Host kernel: 3.10.0-216.el7.ppc64/3.10.0-217.el7.ppc64
Qemu-kvm:
qemu-kvm-rhev-2.1.2-17.el7.ppc64
qemu-kvm-tools-rhev-2.1.2-17.el7.ppc64
qemu-kvm-common-rhev-2.1.2-17.el7.ppc64
qemu-kvm-rhev-debuginfo-2.1.2-17.el7.ppc64


How reproducible:
100%


Additional info:
None

Comment 2 David Gibson 2015-01-13 04:56:01 UTC
Ok, looks like the version of kvm_stat in RHEL just doesn't have ppc support.  Michael Ellerman posted a bunch of extensions to fix that which are merged upstream.

I'll backport.

Comment 3 David Gibson 2015-01-20 03:00:59 UTC
These patches are also already included in the qemu-2.2 based branch.

Miya et al, have you moved onto testing that yet?

Comment 6 Gu Nini 2015-06-30 09:04:53 UTC
Verified the bug on following sw versions:

Host kernel: 3.10.0-282.el7.ppc64le
Qemu-kvm-rhev: qemu-kvm-rhev-2.3.0-5.el7.ppc64le


Now the command output is as follows:
[root@ibm-p8-kvm-02-qe cfg]# kvm_stat
kvm statistics

 Event                                        Total Current
 kvm_userspace_exit                        10046876    7563
 kvm_ppc_instr                                10894       5
 kvm_ack_irq                                   1218       0
 kvm_userspace_exit(PAPR_HCALL)                  61	  0

Comment 7 Gu Nini 2015-07-30 06:13:33 UTC
(In reply to Gu Nini from comment #6)


Deeper verify the bug on both ppc64be and ppc64le host with following sw versions:

PPC64BE HOST:
host kernel: 3.10.0-300.el7.ppc64
Qemu-kvm-rhev: qemu-kvm-rhev-2.3.0-13.el7.ppc64

PPC64LE HOST:
host kernel: 3.10.0-300.el7.ppc64le
Qemu-kvm-rhev: qemu-kvm-rhev-2.3.0-13.el7.ppc64le


Now the cmd 'kvm_stat' could be executed without any problem.

Comment 8 Qunfang Zhang 2015-08-03 05:49:35 UTC
Setting to VERIFIED according to comment 7.

Comment 10 errata-xmlrpc 2015-12-04 16:24:56 UTC
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/RHBA-2015-2546.html