qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] qemu/kvm_stat: Powerpc related fixes
@ 2016-04-19  3:24 Hemant Kumar
  0 siblings, 0 replies; 3+ messages in thread
From: Hemant Kumar @ 2016-04-19  3:24 UTC (permalink / raw)
  To: qemu-ppc; +Cc: rankja, pbonzini, qemu-devel

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>
---
 scripts/kvm/kvm_stat | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/scripts/kvm/kvm_stat b/scripts/kvm/kvm_stat
index 769d884..27d217a 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):
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Qemu-devel] [PATCH] qemu/kvm_stat: Powerpc related fixes
@ 2016-04-19  3:29 Hemant Kumar
  2016-05-10 11:58 ` Paolo Bonzini
  0 siblings, 1 reply; 3+ messages in thread
From: Hemant Kumar @ 2016-04-19  3:29 UTC (permalink / raw)
  To: qemu-ppc; +Cc: frankja, pbonzini, qemu-devel

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>
---
 scripts/kvm/kvm_stat | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/scripts/kvm/kvm_stat b/scripts/kvm/kvm_stat
index 769d884..27d217a 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):
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] qemu/kvm_stat: Powerpc related fixes
  2016-04-19  3:29 [Qemu-devel] [PATCH] qemu/kvm_stat: Powerpc related fixes Hemant Kumar
@ 2016-05-10 11:58 ` Paolo Bonzini
  0 siblings, 0 replies; 3+ messages in thread
From: Paolo Bonzini @ 2016-05-10 11:58 UTC (permalink / raw)
  To: Hemant Kumar, qemu-ppc; +Cc: frankja, qemu-devel, qemu-stable

On 19/04/2016 05:29, Hemant Kumar wrote:
> 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>
> ---
>  scripts/kvm/kvm_stat | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/scripts/kvm/kvm_stat b/scripts/kvm/kvm_stat
> index 769d884..27d217a 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):
> 

Cc: qemu-stable@nongnu.org

Queued for 2.7 and 2.6.1, thanks.

Paolo

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-05-10 11:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-19  3:29 [Qemu-devel] [PATCH] qemu/kvm_stat: Powerpc related fixes Hemant Kumar
2016-05-10 11:58 ` Paolo Bonzini
  -- strict thread matches above, loose matches on Subject: below --
2016-04-19  3:24 Hemant Kumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).