summaryrefslogtreecommitdiff
path: root/drivers/s390/cio/vfio_ccw_private.h
diff options
context:
space:
mode:
authorDong Jia Shi <bjsdjshi@linux.vnet.ibm.com>2017-03-17 06:17:38 +0300
committerCornelia Huck <cornelia.huck@de.ibm.com>2017-03-31 13:55:09 +0300
commit120e214e504fd6d3e33ec4b661193600b2faab95 (patch)
tree781dcb51968c9f6e3860570b177a73306add0a47 /drivers/s390/cio/vfio_ccw_private.h
parent83d1193a96dc78576c15f93cd70e0558763a85b3 (diff)
downloadlinux-120e214e504fd6d3e33ec4b661193600b2faab95.tar.xz
vfio: ccw: realize VFIO_DEVICE_G(S)ET_IRQ_INFO ioctls
Realize VFIO_DEVICE_GET_IRQ_INFO ioctl to retrieve VFIO_CCW_IO_IRQ information. Realize VFIO_DEVICE_SET_IRQS ioctl to set an eventfd fd for VFIO_CCW_IO_IRQ. Once a write operation to the ccw_io_region was performed, trigger a signal on this fd. Reviewed-by: Pierre Morel <pmorel@linux.vnet.ibm.com> Signed-off-by: Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com> Acked-by: Alex Williamson <alex.williamson@redhat.com> Message-Id: <20170317031743.40128-12-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.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/s390/cio/vfio_ccw_private.h b/drivers/s390/cio/vfio_ccw_private.h
index 79e53378f212..dddab52913ed 100644
--- a/drivers/s390/cio/vfio_ccw_private.h
+++ b/drivers/s390/cio/vfio_ccw_private.h
@@ -11,6 +11,7 @@
#define _VFIO_CCW_PRIVATE_H_
#include <linux/completion.h>
+#include <linux/eventfd.h>
#include <linux/vfio_ccw.h>
#include "css.h"
@@ -29,6 +30,7 @@
* @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
*/
struct vfio_ccw_private {
struct subchannel *sch;
@@ -43,6 +45,8 @@ struct vfio_ccw_private {
struct channel_program cp;
struct irb irb;
union scsw scsw;
+
+ struct eventfd_ctx *io_trigger;
} __aligned(8);
extern int vfio_ccw_mdev_reg(struct subchannel *sch);