Re: [PATCH v2 1/2] vfio: Replace the DMA unmapping notifier with a callback

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

 



On Tue, 2022-06-07 at 20:02 -0300, Jason Gunthorpe wrote:
> Instead of having drivers register the notifier with explicit code
> just
> have them provide a dma_unmap callback op in their driver ops and
> rely on
> the core code to wire it up.
> 
> Suggested-by: Christoph Hellwig <hch@xxxxxx>
> Reviewed-by: Christoph Hellwig <hch@xxxxxx>
> Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/gvt/gvt.h        |   1 -
>  drivers/gpu/drm/i915/gvt/kvmgt.c      |  75 ++++-----------
>  drivers/s390/cio/vfio_ccw_ops.c       |  41 ++-------
>  drivers/s390/cio/vfio_ccw_private.h   |   1 -
>  drivers/s390/crypto/vfio_ap_ops.c     |  53 ++---------
>  drivers/s390/crypto/vfio_ap_private.h |   3 -
>  drivers/vfio/vfio.c                   | 126 +++++++++---------------
> --
>  drivers/vfio/vfio.h                   |   5 +
>  include/linux/vfio.h                  |  21 +----
>  9 files changed, 87 insertions(+), 239 deletions(-)
> 
> 

...snip...

> diff --git a/drivers/s390/cio/vfio_ccw_private.h
> b/drivers/s390/cio/vfio_ccw_private.h
> index 7272eb78861244..2627791c9006d4 100644
> --- a/drivers/s390/cio/vfio_ccw_private.h
> +++ b/drivers/s390/cio/vfio_ccw_private.h
> @@ -98,7 +98,6 @@ struct vfio_ccw_private {
>  	struct completion	*completion;
>  	atomic_t		avail;
>  	struct mdev_device	*mdev;
> -	struct notifier_block	nb;

Could you also remove this from the comment block above the struct?
Besides that, this is fine for -ccw.

Reviewed-by: Eric Farman <farman@xxxxxxxxxxxxx>

>  	struct ccw_io_region	*io_region;
>  	struct mutex		io_mutex;
>  	struct vfio_ccw_region *region;
> 

...snip...




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux