On 05/22/2019 06:17 AM, Cornelia Huck wrote:
On Tue, 21 May 2019 16:50:47 -0400
Farhan Ali <al...@linux.ibm.com> wrote:

On 05/07/2019 11:47 AM, Cornelia Huck wrote:
A vfio-ccw device may provide an async command subregion for
issuing halt/clear subchannel requests. If it is present, use
it for sending halt/clear request to the device; if not, fall
back to emulation (as done today).

Signed-off-by: Cornelia Huck <coh...@redhat.com>
---
   hw/s390x/css.c              |  27 +++++++--
   hw/vfio/ccw.c               | 110 +++++++++++++++++++++++++++++++++++-
   include/hw/s390x/s390-ccw.h |   3 +
   3 files changed, 134 insertions(+), 6 deletions(-)

diff --git a/include/hw/s390x/s390-ccw.h b/include/hw/s390x/s390-ccw.h
index 901d805d79a3..e9c7e1db5761 100644
--- a/include/hw/s390x/s390-ccw.h
+++ b/include/hw/s390x/s390-ccw.h
@@ -37,4 +37,7 @@ typedef struct S390CCWDeviceClass {
       IOInstEnding (*handle_request) (SubchDev *sch);
   } S390CCWDeviceClass;
+int vfio_ccw_handle_clear(SubchDev *sch);
+int vfio_ccw_handle_halt(SubchDev *sch);
+

We are not making clear and halt functions part of the
S390CCWDeviceClass, is there are reason for doing this?
Currently we handle ssch through the handle_request function, it just
looks a little inconsistent.

I don't quite remember why I did it this way; not sure if there is a
good reason for that (that patch has been around for too long...)

We can change such internal details later on, though. (And I think your
comment has merit.)


Yes, sure we could change it later on. I do prefer your way though, it avoids one more layer of indirection.

Thanks
Farhan


Reply via email to