qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] s390x/kvm: add tracepoint to ioeventfd interface
@ 2019-02-12 15:30 Cornelia Huck
  2019-02-12 15:52 ` Philippe Mathieu-Daudé
  2019-02-14 10:45 ` Cornelia Huck
  0 siblings, 2 replies; 6+ messages in thread
From: Cornelia Huck @ 2019-02-12 15:30 UTC (permalink / raw)
  To: Halil Pasic, Christian Borntraeger, Richard Henderson,
	David Hildenbrand
  Cc: qemu-s390x, qemu-devel, Cornelia Huck

Trace when assigning/unassigning.

Signed-off-by: Cornelia Huck <cohuck@redhat.com>
---
 target/s390x/kvm.c        | 2 ++
 target/s390x/trace-events | 1 +
 2 files changed, 3 insertions(+)

diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c
index 15fdc168e1c5..7d61bd109092 100644
--- a/target/s390x/kvm.c
+++ b/target/s390x/kvm.c
@@ -1886,6 +1886,8 @@ int kvm_s390_assign_subch_ioeventfd(EventNotifier *notifier, uint32_t sch,
         .addr = sch,
         .len = 8,
     };
+    trace_kvm_s390_assign_subch_ioeventfd(kick.fd, kick.addr, assign,
+                                          kick.datamatch);
     if (!kvm_check_extension(kvm_state, KVM_CAP_IOEVENTFD)) {
         return -ENOSYS;
     }
diff --git a/target/s390x/trace-events b/target/s390x/trace-events
index a84e316e4937..bdc22f42cdbb 100644
--- a/target/s390x/trace-events
+++ b/target/s390x/trace-events
@@ -14,6 +14,7 @@ ioinst_chsc_cmd(uint16_t cmd, uint16_t len) "IOINST: chsc command 0x%04x, len 0x
 kvm_enable_cmma(int rc) "CMMA: enabling with result code %d"
 kvm_clear_cmma(int rc) "CMMA: clearing with result code %d"
 kvm_failed_cpu_state_set(int cpu_index, uint8_t state, const char *msg) "Warning: Unable to set cpu %d state %" PRIu8 " to KVM: %s"
+kvm_s390_assign_subch_ioeventfd(int fd, uint32_t addr, bool assign, int datamatch) "fd: %d sch: @0x%x assign: %d vq: %d"
 
 # target/s390x/cpu.c
 cpu_set_state(int cpu_index, uint8_t state) "setting cpu %d state to %" PRIu8
-- 
2.17.2

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

* Re: [Qemu-devel] [PATCH] s390x/kvm: add tracepoint to ioeventfd interface
  2019-02-12 15:30 [Qemu-devel] [PATCH] s390x/kvm: add tracepoint to ioeventfd interface Cornelia Huck
@ 2019-02-12 15:52 ` Philippe Mathieu-Daudé
  2019-02-12 15:58   ` Cornelia Huck
  2019-02-14 10:45 ` Cornelia Huck
  1 sibling, 1 reply; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-02-12 15:52 UTC (permalink / raw)
  To: Cornelia Huck, Halil Pasic, Christian Borntraeger,
	Richard Henderson, David Hildenbrand
  Cc: qemu-s390x, qemu-devel

Hi Cornelia,

On 2/12/19 4:30 PM, Cornelia Huck wrote:
> Trace when assigning/unassigning.
> 
> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
> ---
>  target/s390x/kvm.c        | 2 ++
>  target/s390x/trace-events | 1 +
>  2 files changed, 3 insertions(+)
> 
> diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c
> index 15fdc168e1c5..7d61bd109092 100644
> --- a/target/s390x/kvm.c
> +++ b/target/s390x/kvm.c
> @@ -1886,6 +1886,8 @@ int kvm_s390_assign_subch_ioeventfd(EventNotifier *notifier, uint32_t sch,
>          .addr = sch,
>          .len = 8,
>      };
> +    trace_kvm_s390_assign_subch_ioeventfd(kick.fd, kick.addr, assign,
> +                                          kick.datamatch);
>      if (!kvm_check_extension(kvm_state, KVM_CAP_IOEVENTFD)) {
>          return -ENOSYS;
>      }
> diff --git a/target/s390x/trace-events b/target/s390x/trace-events
> index a84e316e4937..bdc22f42cdbb 100644
> --- a/target/s390x/trace-events
> +++ b/target/s390x/trace-events
> @@ -14,6 +14,7 @@ ioinst_chsc_cmd(uint16_t cmd, uint16_t len) "IOINST: chsc command 0x%04x, len 0x
>  kvm_enable_cmma(int rc) "CMMA: enabling with result code %d"
>  kvm_clear_cmma(int rc) "CMMA: clearing with result code %d"
>  kvm_failed_cpu_state_set(int cpu_index, uint8_t state, const char *msg) "Warning: Unable to set cpu %d state %" PRIu8 " to KVM: %s"
> +kvm_s390_assign_subch_ioeventfd(int fd, uint32_t addr, bool assign, int datamatch) "fd: %d sch: @0x%x assign: %d vq: %d"

I noticed all s390x related trace events don't specify 's390' in the
event name, maybe you can simply strip it. If you agree, feel free to
apply that change directly yourself, no need for v2 ;)

Regardless the name used:
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

>  
>  # target/s390x/cpu.c
>  cpu_set_state(int cpu_index, uint8_t state) "setting cpu %d state to %" PRIu8
> 

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

* Re: [Qemu-devel] [PATCH] s390x/kvm: add tracepoint to ioeventfd interface
  2019-02-12 15:52 ` Philippe Mathieu-Daudé
@ 2019-02-12 15:58   ` Cornelia Huck
  2019-02-12 16:12     ` David Hildenbrand
  0 siblings, 1 reply; 6+ messages in thread
From: Cornelia Huck @ 2019-02-12 15:58 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Halil Pasic, Christian Borntraeger, Richard Henderson,
	David Hildenbrand, qemu-s390x, qemu-devel

On Tue, 12 Feb 2019 16:52:09 +0100
Philippe Mathieu-Daudé <philmd@redhat.com> wrote:

> Hi Cornelia,
> 
> On 2/12/19 4:30 PM, Cornelia Huck wrote:
> > Trace when assigning/unassigning.
> > 
> > Signed-off-by: Cornelia Huck <cohuck@redhat.com>
> > ---
> >  target/s390x/kvm.c        | 2 ++
> >  target/s390x/trace-events | 1 +
> >  2 files changed, 3 insertions(+)
> > 
> > diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c
> > index 15fdc168e1c5..7d61bd109092 100644
> > --- a/target/s390x/kvm.c
> > +++ b/target/s390x/kvm.c
> > @@ -1886,6 +1886,8 @@ int kvm_s390_assign_subch_ioeventfd(EventNotifier *notifier, uint32_t sch,
> >          .addr = sch,
> >          .len = 8,
> >      };
> > +    trace_kvm_s390_assign_subch_ioeventfd(kick.fd, kick.addr, assign,
> > +                                          kick.datamatch);
> >      if (!kvm_check_extension(kvm_state, KVM_CAP_IOEVENTFD)) {
> >          return -ENOSYS;
> >      }
> > diff --git a/target/s390x/trace-events b/target/s390x/trace-events
> > index a84e316e4937..bdc22f42cdbb 100644
> > --- a/target/s390x/trace-events
> > +++ b/target/s390x/trace-events
> > @@ -14,6 +14,7 @@ ioinst_chsc_cmd(uint16_t cmd, uint16_t len) "IOINST: chsc command 0x%04x, len 0x
> >  kvm_enable_cmma(int rc) "CMMA: enabling with result code %d"
> >  kvm_clear_cmma(int rc) "CMMA: clearing with result code %d"
> >  kvm_failed_cpu_state_set(int cpu_index, uint8_t state, const char *msg) "Warning: Unable to set cpu %d state %" PRIu8 " to KVM: %s"
> > +kvm_s390_assign_subch_ioeventfd(int fd, uint32_t addr, bool assign, int datamatch) "fd: %d sch: @0x%x assign: %d vq: %d"  
> 
> I noticed all s390x related trace events don't specify 's390' in the
> event name, maybe you can simply strip it. If you agree, feel free to
> apply that change directly yourself, no need for v2 ;)

Yeah; not exactly sure why the other events do that, though... I can
strip it if others agree.

> 
> Regardless the name used:
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

Thanks!

> 
> >  
> >  # target/s390x/cpu.c
> >  cpu_set_state(int cpu_index, uint8_t state) "setting cpu %d state to %" PRIu8
> >   

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

* Re: [Qemu-devel] [PATCH] s390x/kvm: add tracepoint to ioeventfd interface
  2019-02-12 15:58   ` Cornelia Huck
@ 2019-02-12 16:12     ` David Hildenbrand
  2019-02-13 10:41       ` Cornelia Huck
  0 siblings, 1 reply; 6+ messages in thread
From: David Hildenbrand @ 2019-02-12 16:12 UTC (permalink / raw)
  To: Cornelia Huck, Philippe Mathieu-Daudé
  Cc: Halil Pasic, Christian Borntraeger, Richard Henderson, qemu-s390x,
	qemu-devel

On 12.02.19 16:58, Cornelia Huck wrote:
> On Tue, 12 Feb 2019 16:52:09 +0100
> Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
> 
>> Hi Cornelia,
>>
>> On 2/12/19 4:30 PM, Cornelia Huck wrote:
>>> Trace when assigning/unassigning.
>>>
>>> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
>>> ---
>>>  target/s390x/kvm.c        | 2 ++
>>>  target/s390x/trace-events | 1 +
>>>  2 files changed, 3 insertions(+)
>>>
>>> diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c
>>> index 15fdc168e1c5..7d61bd109092 100644
>>> --- a/target/s390x/kvm.c
>>> +++ b/target/s390x/kvm.c
>>> @@ -1886,6 +1886,8 @@ int kvm_s390_assign_subch_ioeventfd(EventNotifier *notifier, uint32_t sch,
>>>          .addr = sch,
>>>          .len = 8,
>>>      };
>>> +    trace_kvm_s390_assign_subch_ioeventfd(kick.fd, kick.addr, assign,
>>> +                                          kick.datamatch);
>>>      if (!kvm_check_extension(kvm_state, KVM_CAP_IOEVENTFD)) {
>>>          return -ENOSYS;
>>>      }
>>> diff --git a/target/s390x/trace-events b/target/s390x/trace-events
>>> index a84e316e4937..bdc22f42cdbb 100644
>>> --- a/target/s390x/trace-events
>>> +++ b/target/s390x/trace-events
>>> @@ -14,6 +14,7 @@ ioinst_chsc_cmd(uint16_t cmd, uint16_t len) "IOINST: chsc command 0x%04x, len 0x
>>>  kvm_enable_cmma(int rc) "CMMA: enabling with result code %d"
>>>  kvm_clear_cmma(int rc) "CMMA: clearing with result code %d"
>>>  kvm_failed_cpu_state_set(int cpu_index, uint8_t state, const char *msg) "Warning: Unable to set cpu %d state %" PRIu8 " to KVM: %s"
>>> +kvm_s390_assign_subch_ioeventfd(int fd, uint32_t addr, bool assign, int datamatch) "fd: %d sch: @0x%x assign: %d vq: %d"  
>>
>> I noticed all s390x related trace events don't specify 's390' in the
>> event name, maybe you can simply strip it. If you agree, feel free to
>> apply that change directly yourself, no need for v2 ;)
> 
> Yeah; not exactly sure why the other events do that, though... I can
> strip it if others agree.

Yes, let's keep it consistent. Or if you feel like crafting patches,
rename the others ;)

> 
>>
>> Regardless the name used:
>> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> 
> Thanks!
> 
>>
>>>  
>>>  # target/s390x/cpu.c
>>>  cpu_set_state(int cpu_index, uint8_t state) "setting cpu %d state to %" PRIu8
>>>   
> 


-- 

Thanks,

David / dhildenb

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

* Re: [Qemu-devel] [PATCH] s390x/kvm: add tracepoint to ioeventfd interface
  2019-02-12 16:12     ` David Hildenbrand
@ 2019-02-13 10:41       ` Cornelia Huck
  0 siblings, 0 replies; 6+ messages in thread
From: Cornelia Huck @ 2019-02-13 10:41 UTC (permalink / raw)
  To: David Hildenbrand
  Cc: Philippe Mathieu-Daudé, Halil Pasic, Christian Borntraeger,
	Richard Henderson, qemu-s390x, qemu-devel

On Tue, 12 Feb 2019 17:12:33 +0100
David Hildenbrand <david@redhat.com> wrote:

> On 12.02.19 16:58, Cornelia Huck wrote:
> > On Tue, 12 Feb 2019 16:52:09 +0100
> > Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
> >   
> >> Hi Cornelia,
> >>
> >> On 2/12/19 4:30 PM, Cornelia Huck wrote:  
> >>> Trace when assigning/unassigning.
> >>>
> >>> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
> >>> ---
> >>>  target/s390x/kvm.c        | 2 ++
> >>>  target/s390x/trace-events | 1 +
> >>>  2 files changed, 3 insertions(+)
> >>>
> >>> diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c
> >>> index 15fdc168e1c5..7d61bd109092 100644
> >>> --- a/target/s390x/kvm.c
> >>> +++ b/target/s390x/kvm.c
> >>> @@ -1886,6 +1886,8 @@ int kvm_s390_assign_subch_ioeventfd(EventNotifier *notifier, uint32_t sch,
> >>>          .addr = sch,
> >>>          .len = 8,
> >>>      };
> >>> +    trace_kvm_s390_assign_subch_ioeventfd(kick.fd, kick.addr, assign,
> >>> +                                          kick.datamatch);
> >>>      if (!kvm_check_extension(kvm_state, KVM_CAP_IOEVENTFD)) {
> >>>          return -ENOSYS;
> >>>      }
> >>> diff --git a/target/s390x/trace-events b/target/s390x/trace-events
> >>> index a84e316e4937..bdc22f42cdbb 100644
> >>> --- a/target/s390x/trace-events
> >>> +++ b/target/s390x/trace-events
> >>> @@ -14,6 +14,7 @@ ioinst_chsc_cmd(uint16_t cmd, uint16_t len) "IOINST: chsc command 0x%04x, len 0x
> >>>  kvm_enable_cmma(int rc) "CMMA: enabling with result code %d"
> >>>  kvm_clear_cmma(int rc) "CMMA: clearing with result code %d"
> >>>  kvm_failed_cpu_state_set(int cpu_index, uint8_t state, const char *msg) "Warning: Unable to set cpu %d state %" PRIu8 " to KVM: %s"
> >>> +kvm_s390_assign_subch_ioeventfd(int fd, uint32_t addr, bool assign, int datamatch) "fd: %d sch: @0x%x assign: %d vq: %d"    
> >>
> >> I noticed all s390x related trace events don't specify 's390' in the
> >> event name, maybe you can simply strip it. If you agree, feel free to
> >> apply that change directly yourself, no need for v2 ;)  
> > 
> > Yeah; not exactly sure why the other events do that, though... I can
> > strip it if others agree.  
> 
> Yes, let's keep it consistent. Or if you feel like crafting patches,
> rename the others ;)

I just went with the path of least resistance and removed the 's390' :)

Any acks before I queue this?

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

* Re: [Qemu-devel] [PATCH] s390x/kvm: add tracepoint to ioeventfd interface
  2019-02-12 15:30 [Qemu-devel] [PATCH] s390x/kvm: add tracepoint to ioeventfd interface Cornelia Huck
  2019-02-12 15:52 ` Philippe Mathieu-Daudé
@ 2019-02-14 10:45 ` Cornelia Huck
  1 sibling, 0 replies; 6+ messages in thread
From: Cornelia Huck @ 2019-02-14 10:45 UTC (permalink / raw)
  To: Halil Pasic, Christian Borntraeger, Richard Henderson,
	David Hildenbrand
  Cc: qemu-s390x, qemu-devel

On Tue, 12 Feb 2019 16:30:25 +0100
Cornelia Huck <cohuck@redhat.com> wrote:

> Trace when assigning/unassigning.
> 
> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
> ---
>  target/s390x/kvm.c        | 2 ++
>  target/s390x/trace-events | 1 +
>  2 files changed, 3 insertions(+)

Queued to s390-next (without the 's390' infix).

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

end of thread, other threads:[~2019-02-14 10:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-12 15:30 [Qemu-devel] [PATCH] s390x/kvm: add tracepoint to ioeventfd interface Cornelia Huck
2019-02-12 15:52 ` Philippe Mathieu-Daudé
2019-02-12 15:58   ` Cornelia Huck
2019-02-12 16:12     ` David Hildenbrand
2019-02-13 10:41       ` Cornelia Huck
2019-02-14 10:45 ` Cornelia Huck

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).