Skip to contentSkip to conversation

s390x/kvm: add tracepoint to ioeventfd interface

PATCH Applied Cornelia Huck 3 participants 6 messages Feb 12, 2019 – Feb 14, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 s390x/kvm: add tracepoint to ioeventfd interface

Trace when assigning/unassigning.

---
 target/s390x/kvm.c        | 2 ++
 target/s390x/trace-events | 1 +
 2 files changed, 3 insertions(+)
target/s390x/kvm.c +2 -0
index 15fdc168e1c5..7d61bd109092 100644
@@ -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;
     }
target/s390x/trace-events +1 -0
index a84e316e4937..bdc22f42cdbb 100644
@@ -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
Signature · 1 line
2.17.2
Reviewed-by on v1 1/1
#1 lore raw

Hi Cornelia,

Quoted 26 lines · Cornelia Huck

Trace when assigning/unassigning.

---
 target/s390x/kvm.c        | 2 ++
 target/s390x/trace-events | 1 +
 2 files changed, 3 insertions(+)
target/s390x/kvm.c +2 -0
index 15fdc168e1c5..7d61bd109092 100644
@@ -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;
     }
target/s390x/trace-events +0 -0
index a84e316e4937..bdc22f42cdbb 100644

target/s390x/trace-events ioinst_chsc_cmd(uint16_t cmd, uint16_t len) "IOINST: chsc command 0x%04x, len 0x · line 17

Quoted 4 lines
target/s390x/trace-events +1 -0
@@ -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:

Quoted 4 lines
target/s390x/trace-events +0 -0
 # target/s390x/cpu.c
 cpu_set_state(int cpu_index, uint8_t state) "setting cpu %d state to %" PRIu8
 
#2 lore raw
Quoted 29 lines · On Tue, 12 Feb 2019 16:52:09 +0100 Philippe Mathieu-Daudé <[email protected]>…

Hi Cornelia,

Quoted 26 lines · Cornelia Huck

Trace when assigning/unassigning.

---
 target/s390x/kvm.c        | 2 ++
 target/s390x/trace-events | 1 +
 2 files changed, 3 insertions(+)
target/s390x/kvm.c +2 -0
index 15fdc168e1c5..7d61bd109092 100644
@@ -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;
     }
target/s390x/trace-events +0 -0
index a84e316e4937..bdc22f42cdbb 100644
@@ -14,6 +14,7 @@ ioinst_chsc_cmd(uint16_t cmd, uint16_t len) "IOINST: chsc command 0x%04x, len 0x
Quoted 8 lines

target/s390x/trace-events ioinst_chsc_cmd(uint16_t cmd, uint16_t len) "IOINST: chsc command 0x%04x, len 0x · line 17

Quoted 4 lines
target/s390x/trace-events +1 -0
 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.

Quoted 3 lines

Regardless the name used:

Thanks!

Quoted 5 lines
Quoted 5 lines
target/s390x/trace-events +0 -0
 # target/s390x/cpu.c
 cpu_set_state(int cpu_index, uint8_t state) "setting cpu %d state to %" PRIu8
 
#3 lore raw
Quoted 41 lines · Cornelia Huck
Quoted 29 lines · On Tue, 12 Feb 2019 16:52:09 +0100 Philippe Mathieu-Daudé <[email protected]>…

Hi Cornelia,

Quoted 26 lines · Cornelia Huck

Trace when assigning/unassigning.

---
 target/s390x/kvm.c        | 2 ++
 target/s390x/trace-events | 1 +
 2 files changed, 3 insertions(+)
target/s390x/kvm.c +2 -0
index 15fdc168e1c5..7d61bd109092 100644
@@ -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;
     }
target/s390x/trace-events +0 -0
index a84e316e4937..bdc22f42cdbb 100644
@@ -14,6 +14,7 @@ ioinst_chsc_cmd(uint16_t cmd, uint16_t len) "IOINST: chsc command 0x%04x, len 0x
Quoted 8 lines

target/s390x/trace-events ioinst_chsc_cmd(uint16_t cmd, uint16_t len) "IOINST: chsc command 0x%04x, len 0x · line 17

Quoted 4 lines
target/s390x/trace-events +1 -0
 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 ;)

Quoted 2 lines

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

Quoted 13 lines
Quoted 4 lines

Regardless the name used:

Thanks!

Quoted 5 lines
Quoted 5 lines
target/s390x/trace-events +0 -0
 # target/s390x/cpu.c
 cpu_set_state(int cpu_index, uint8_t state) "setting cpu %d state to %" PRIu8
 
Signature · 3 lines
Thanks,

David / dhildenb
#4 lore raw
Quoted 42 lines · On Tue, 12 Feb 2019 17:12:33 +0100 David Hildenbrand <[email protected]> wrote:
Quoted 41 lines · Cornelia Huck
Quoted 37 lines · On Tue, 12 Feb 2019 16:52:09 +0100 Philippe Mathieu-Daudé <[email protected]>…

Hi Cornelia,

Quoted 26 lines · Cornelia Huck

Trace when assigning/unassigning.

---
 target/s390x/kvm.c        | 2 ++
 target/s390x/trace-events | 1 +
 2 files changed, 3 insertions(+)
target/s390x/kvm.c +2 -0
index 15fdc168e1c5..7d61bd109092 100644
@@ -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;
     }
target/s390x/trace-events +0 -0
index a84e316e4937..bdc22f42cdbb 100644

target/s390x/trace-events ioinst_chsc_cmd(uint16_t cmd, uint16_t len) "IOINST: chsc command 0x%04x, len 0x · line 17

Quoted 4 lines
target/s390x/trace-events +1 -0
@@ -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 ;)

Quoted 5 lines
Quoted 2 lines

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?