aboutsummaryrefslogtreecommitdiff
path: root/scripts/kvm
diff options
context:
space:
mode:
authorHemant Kumar <hemant@linux.vnet.ibm.com>2016-04-19 08:54:54 +0530
committerMichael Roth <mdroth@linux.vnet.ibm.com>2016-08-04 16:23:35 -0500
commit5a908cb1a8a3cfcade9d35b6819168785ca1fe78 (patch)
tree898c5ba587a2e6956d374c2b3ea3bdaa007f4573 /scripts/kvm
parent07a3a482c3d10c2b83e5a3052428db502578179a (diff)
tools: kvm_stat: Powerpc related fixes
kvm_stat script is failing to execute on powerpc : # ./kvm_stat Traceback (most recent call last): File "./kvm_stat", line 825, in <module> main() File "./kvm_stat", line 813, in main providers = get_providers(options) File "./kvm_stat", line 778, in get_providers providers.append(TracepointProvider()) File "./kvm_stat", line 416, in __init__ self.filters = get_filters() File "./kvm_stat", line 315, in get_filters if ARCH.exit_reasons: AttributeError: 'ArchPPC' object has no attribute 'exit_reasons' This is because, its trying to access a non-defined attribute. Also, the IOCTL number of RESET is incorrect for powerpc. The correct number has been added. Signed-off-by: Hemant Kumar <hemant@linux.vnet.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> * cherry-picked from linux commit c7d4fb5a Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Diffstat (limited to 'scripts/kvm')
-rwxr-xr-xscripts/kvm/kvm_stat2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/kvm/kvm_stat b/scripts/kvm/kvm_stat
index 769d884b6d..27d217a4c4 100755
--- a/scripts/kvm/kvm_stat
+++ b/scripts/kvm/kvm_stat
@@ -256,11 +256,13 @@ class ArchPPC(Arch):
self.ioctl_numbers = IOCTL_NUMBERS
self.ioctl_numbers['ENABLE'] = 0x20002400
self.ioctl_numbers['DISABLE'] = 0x20002401
+ self.ioctl_numbers['RESET'] = 0x20002403
# PPC comes in 32 and 64 bit and some generated ioctl
# numbers depend on the wordsize.
char_ptr_size = ctypes.sizeof(ctypes.c_char_p)
self.ioctl_numbers['SET_FILTER'] = 0x80002406 | char_ptr_size << 16
+ self.exit_reasons = {}
class ArchA64(Arch):
def __init__(self):