From 8ca2b376b47fff58f7ab6f16d86a66d4af3a2be2 Mon Sep 17 00:00:00 2001 From: Xiao Feng Ren Date: Wed, 17 May 2017 02:48:10 +0200 Subject: s390x/css: introduce and realize ccw-request callback Introduce a new callback on subchannel to handle ccw-request. Realize the callback in vfio-ccw device. Besides, resort to the event notifier handler to handling the ccw-request results. 1. Pread the I/O results via MMIO region. 2. Update the scsw info to guest. 3. Inject an I/O interrupt to notify guest the I/O result. Acked-by: Alex Williamson Signed-off-by: Xiao Feng Ren Signed-off-by: Dong Jia Shi Message-Id: <20170517004813.58227-11-bjsdjshi@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck --- hw/s390x/css.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'hw/s390x') diff --git a/hw/s390x/css.c b/hw/s390x/css.c index a8aed9cb3a..462a768f9e 100644 --- a/hw/s390x/css.c +++ b/hw/s390x/css.c @@ -259,7 +259,7 @@ uint16_t css_build_subchannel_id(SubchDev *sch) return css_do_build_subchannel_id(sch->cssid, sch->ssid); } -static void css_inject_io_interrupt(SubchDev *sch) +void css_inject_io_interrupt(SubchDev *sch) { uint8_t isc = (sch->curr_status.pmcw.flags & PMCW_FLAGS_MASK_ISC) >> 11; @@ -671,7 +671,7 @@ static void copy_pmcw_to_guest(PMCW *dest, const PMCW *src) dest->chars = cpu_to_be32(src->chars); } -static void copy_scsw_to_guest(SCSW *dest, const SCSW *src) +void copy_scsw_to_guest(SCSW *dest, const SCSW *src) { dest->flags = cpu_to_be16(src->flags); dest->ctrl = cpu_to_be16(src->ctrl); -- cgit v1.2.3