diff options
author | Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com> | 2017-03-17 06:17:39 +0300 |
---|---|---|
committer | Cornelia Huck <cornelia.huck@de.ibm.com> | 2017-03-31 13:55:10 +0300 |
commit | e5f84dbaea59b4f712dac428c337528b70e1c533 (patch) | |
tree | f39d0e4e18b8a24b4da0b2d71f7a5c4aa70b3d18 /drivers/s390/cio/vfio_ccw_private.h | |
parent | 120e214e504fd6d3e33ec4b661193600b2faab95 (diff) | |
download | linux-e5f84dbaea59b4f712dac428c337528b70e1c533.tar.xz |
vfio: ccw: return I/O results asynchronously
Introduce a singlethreaded workqueue to handle the I/O interrupts.
With the work added to this queue, we store the I/O results to the
io_region of the subchannel, then signal the userspace program to
handle the results.
Signed-off-by: Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>
Message-Id: <20170317031743.40128-13-bjsdjshi@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio/vfio_ccw_private.h')
-rw-r--r-- | drivers/s390/cio/vfio_ccw_private.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/s390/cio/vfio_ccw_private.h b/drivers/s390/cio/vfio_ccw_private.h index dddab52913ed..2503797fb153 100644 --- a/drivers/s390/cio/vfio_ccw_private.h +++ b/drivers/s390/cio/vfio_ccw_private.h @@ -12,6 +12,7 @@ #include <linux/completion.h> #include <linux/eventfd.h> +#include <linux/workqueue.h> #include <linux/vfio_ccw.h> #include "css.h" @@ -25,12 +26,11 @@ * @mdev: pointer to the mediated device * @nb: notifier for vfio events * @io_region: MMIO region to input/output I/O arguments/results - * @wait_q: wait for interrupt - * @intparm: record current interrupt parameter, used for wait interrupt * @cp: channel program for the current I/O operation * @irb: irb info received from interrupt * @scsw: scsw info * @io_trigger: eventfd ctx for signaling userspace I/O results + * @io_work: work for deferral process of I/O handling */ struct vfio_ccw_private { struct subchannel *sch; @@ -40,13 +40,12 @@ struct vfio_ccw_private { struct notifier_block nb; struct ccw_io_region io_region; - wait_queue_head_t wait_q; - u32 intparm; struct channel_program cp; struct irb irb; union scsw scsw; struct eventfd_ctx *io_trigger; + struct work_struct io_work; } __aligned(8); extern int vfio_ccw_mdev_reg(struct subchannel *sch); |