summaryrefslogtreecommitdiff
path: root/drivers/s390/cio/vfio_ccw_cp.h
diff options
context:
space:
mode:
authorEric Farman <farman@linux.ibm.com>2022-07-28 23:49:12 +0300
committerAlex Williamson <alex.williamson@redhat.com>2022-08-01 22:36:46 +0300
commit5a4fe7c41b586399d502f9970b077178e5dfbacf (patch)
treea02f71fdfe478945640b940cbd909d070bacc30d /drivers/s390/cio/vfio_ccw_cp.h
parent34a255e67615995f729254307a0581c143e03752 (diff)
downloadlinux-5a4fe7c41b586399d502f9970b077178e5dfbacf.tar.xz
vfio/ccw: Add length to DMA_UNMAP checks
As pointed out with the simplification of the VFIO_IOMMU_NOTIFY_DMA_UNMAP notifier [1], the length parameter was never used to check against the pinned pages. Let's correct that, and see if a page is within the affected range instead of simply the first page of the range. [1] https://lore.kernel.org/kvm/20220720170457.39cda0d0.alex.williamson@redhat.com/ Signed-off-by: Eric Farman <farman@linux.ibm.com> Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Link: https://lore.kernel.org/r/20220728204914.2420989-2-farman@linux.ibm.com Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'drivers/s390/cio/vfio_ccw_cp.h')
-rw-r--r--drivers/s390/cio/vfio_ccw_cp.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/s390/cio/vfio_ccw_cp.h b/drivers/s390/cio/vfio_ccw_cp.h
index 3194d887e08e..54d26e242533 100644
--- a/drivers/s390/cio/vfio_ccw_cp.h
+++ b/drivers/s390/cio/vfio_ccw_cp.h
@@ -46,6 +46,6 @@ void cp_free(struct channel_program *cp);
int cp_prefetch(struct channel_program *cp);
union orb *cp_get_orb(struct channel_program *cp, u32 intparm, u8 lpm);
void cp_update_scsw(struct channel_program *cp, union scsw *scsw);
-bool cp_iova_pinned(struct channel_program *cp, u64 iova);
+bool cp_iova_pinned(struct channel_program *cp, u64 iova, u64 length);
#endif