qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Cornelia Huck <cohuck@redhat.com>
To: Dong Jia Shi <bjsdjshi@linux.ibm.com>,
	Halil Pasic <pasic@linux.ibm.com>,
	Pierre Morel <pmorel@linux.ibm.com>
Cc: linux-s390@vger.kernel.org, kvm@vger.kernel.org,
	linux-kernel@vger.kernel.org, qemu-s390x@nongnu.org,
	qemu-devel@nongnu.org, Cornelia Huck <cohuck@redhat.com>
Subject: [Qemu-devel] [PATCH RFC 2/2] s390/css: add some tracing for pass-through handling
Date: Wed,  9 May 2018 17:49:10 +0200	[thread overview]
Message-ID: <20180509154910.23578-3-cohuck@redhat.com> (raw)
In-Reply-To: <20180509154910.23578-1-cohuck@redhat.com>

...so we can get more easily an idea whether halt/clear is sent to
the device or emulated.

Signed-off-by: Cornelia Huck <cohuck@redhat.com>
---
 hw/s390x/css.c        | 6 ++++++
 hw/s390x/trace-events | 4 ++++
 2 files changed, 10 insertions(+)

diff --git a/hw/s390x/css.c b/hw/s390x/css.c
index b6727d0607..b6f3421380 100644
--- a/hw/s390x/css.c
+++ b/hw/s390x/css.c
@@ -1182,11 +1182,13 @@ static void sch_handle_start_func_virtual(SubchDev *sch)
 
 static IOInstEnding sch_handle_clear_func_passthrough(SubchDev *sch)
 {
+    trace_css_handle_clear_pt(sch->cssid, sch->ssid, sch->schid);
     return s390_ccw_cmd_request(sch);
 }
 
 static IOInstEnding sch_handle_halt_func_passthrough(SubchDev *sch)
 {
+    trace_css_handle_halt_pt(sch->cssid, sch->ssid, sch->schid);
     return s390_ccw_cmd_request(sch);
 }
 
@@ -1197,6 +1199,8 @@ static IOInstEnding sch_handle_start_func_passthrough(SubchDev *sch)
     SCSW *s = &sch->curr_status.scsw;
 
     ORB *orb = &sch->orb;
+
+    trace_css_handle_start_pt(sch->cssid, sch->ssid, sch->schid);
     if (!(s->ctrl & SCSW_ACTL_SUSP)) {
         assert(orb != NULL);
         p->intparm = orb->intparm;
@@ -1252,6 +1256,7 @@ IOInstEnding do_subchannel_work_passthrough(SubchDev *sch)
         } else {
             if (sch_handle_clear_func_passthrough(sch) == IOINST_OPNOTSUPP) {
                 no_halt_clear = true;
+                trace_css_no_haltclear_pt();
                 sch_handle_halt_func(sch);
             }
         }
@@ -1260,6 +1265,7 @@ IOInstEnding do_subchannel_work_passthrough(SubchDev *sch)
             sch_handle_halt_func(sch);
         } else {
             if (sch_handle_halt_func_passthrough(sch) == IOINST_OPNOTSUPP) {
+                trace_css_no_haltclear_pt();
                 no_halt_clear = true;
                 sch_handle_halt_func(sch);
             }
diff --git a/hw/s390x/trace-events b/hw/s390x/trace-events
index 0d3622ec6f..d4fd1b9da6 100644
--- a/hw/s390x/trace-events
+++ b/hw/s390x/trace-events
@@ -9,6 +9,10 @@ css_assign_subch(const char *do_assign, uint8_t cssid, uint8_t ssid, uint16_t sc
 css_io_interrupt(int cssid, int ssid, int schid, uint32_t intparm, uint8_t isc, const char *conditional) "CSS: I/O interrupt on sch %x.%x.%04x (intparm 0x%08x, isc 0x%x) %s"
 css_adapter_interrupt(uint8_t isc) "CSS: adapter I/O interrupt (isc 0x%x)"
 css_do_sic(uint16_t mode, uint8_t isc) "CSS: set interruption mode 0x%x on isc 0x%x"
+css_handle_clear_pt(int cssid, int ssid, int schid) "CSS: handling clear function for pass-through subchannel %x.%x.%04x"
+css_handle_halt_pt(int cssid, int ssid, int schid) "CSS: handling halt function for pass-through subchannel %x.%x.%04x"
+css_handle_start_pt(int cssid, int ssid, int schid) "CSS: handling start function for pass-through subchannel %x.%x.%04x"
+css_no_haltclear_pt(void) "CSS: no kernel support for halt/clear function passthrough handling, falling back to emulation"
 
 # hw/s390x/virtio-ccw.c
 virtio_ccw_interpret_ccw(int cssid, int ssid, int schid, int cmd_code) "VIRTIO-CCW: %x.%x.%04x: interpret command 0x%x"
-- 
2.14.3

      parent reply	other threads:[~2018-05-09 15:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-09 15:49 [Qemu-devel] [PATCH RFC 0/2] vfio-ccw: exploit halt/clear subchannel support Cornelia Huck
2018-05-09 15:49 ` [Qemu-devel] [PATCH RFC 1/2] vfio-ccw: forward halt/clear to device if supported Cornelia Huck
2018-05-11  9:53   ` Pierre Morel
2018-05-15 16:01     ` Cornelia Huck
2018-05-16 13:53       ` Pierre Morel
2018-05-16 15:52         ` Cornelia Huck
2018-05-09 15:49 ` Cornelia Huck [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180509154910.23578-3-cohuck@redhat.com \
    --to=cohuck@redhat.com \
    --cc=bjsdjshi@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=pasic@linux.ibm.com \
    --cc=pmorel@linux.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).