[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [qemu-s390x] [PATCH v4 2/2] vfio-ccw: support async command subregio

From: Farhan Ali
Subject: Re: [qemu-s390x] [PATCH v4 2/2] vfio-ccw: support async command subregion
Date: Wed, 22 May 2019 07:53:54 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

On 05/22/2019 06:17 AM, Cornelia Huck wrote:
On Tue, 21 May 2019 16:50:47 -0400
Farhan Ali <address@hidden> 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 <address@hidden>
   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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]