On Fri, 25 Jan 2019 16:00:18 -0500 Eric Farman <farman@xxxxxxxxxxxxx> wrote: > On 01/25/2019 11:19 AM, Eric Farman wrote: > > > > > > On 01/21/2019 06:03 AM, Cornelia Huck wrote: > >> Allow to extend the regions used by vfio-ccw. The first user will be > >> handling of halt and clear subchannel. > >> > >> Signed-off-by: Cornelia Huck <cohuck@xxxxxxxxxx> > >> --- > >> drivers/s390/cio/vfio_ccw_ops.c | 181 ++++++++++++++++++++++++---- > >> drivers/s390/cio/vfio_ccw_private.h | 38 ++++++ > ...snip... > >> diff --git a/drivers/s390/cio/vfio_ccw_private.h > >> b/drivers/s390/cio/vfio_ccw_private.h > >> index e88237697f83..20e75f4f3695 100644 > >> --- a/drivers/s390/cio/vfio_ccw_private.h > >> +++ b/drivers/s390/cio/vfio_ccw_private.h > >> @@ -3,9 +3,11 @@ > >> * Private stuff for vfio_ccw driver > >> * > >> * Copyright IBM Corp. 2017 > >> + * Copyright Red Hat, Inc. 2019 > >> * > >> * Author(s): Dong Jia Shi <bjsdjshi@xxxxxxxxxxxxxxxxxx> > >> * Xiao Feng Ren <renxiaof@xxxxxxxxxxxxxxxxxx> > >> + * Cornelia Huck <cohuck@xxxxxxxxxx> > >> */ > >> #ifndef _VFIO_CCW_PRIVATE_H_ > >> @@ -19,6 +21,38 @@ > >> #include "css.h" > >> #include "vfio_ccw_cp.h" > >> +#define VFIO_CCW_OFFSET_SHIFT 40 > >> +#define VFIO_CCW_OFFSET_TO_INDEX(off) (off >> VFIO_CCW_OFFSET_SHIFT) > >> +#define VFIO_CCW_INDEX_TO_OFFSET(index) ((u64)(index) << > >> VFIO_CCW_OFFSET_SHIFT) > >> +#define VFIO_CCW_OFFSET_MASK (((u64)(1) << VFIO_CCW_OFFSET_SHIFT) > >> - 1) > >> + > >> +/* capability chain handling similar to vfio-pci */ > >> +struct vfio_ccw_private; > >> +struct vfio_ccw_region; > >> + > >> +struct vfio_ccw_regops { > >> + size_t (*read)(struct vfio_ccw_private *private, char __user > >> *buf, > >> + size_t count, loff_t *ppos); > >> + size_t (*write)(struct vfio_ccw_private *private, > >> + const char __user *buf, size_t count, loff_t *ppos); > > Oops. Per my recommendation on v1, you change these to "ssize_t" in > patch 5. Might as well just do that here. Seems to have slipped into the wrong patch during rebase. Will fix.