Skip to content

Commit 8561aa4

Browse files
nicolincawilliam
authored andcommitted
vfio: Rename user_iova of vfio_dma_rw()
Following the updated vfio_pin/unpin_pages(), use the simpler "iova". Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Reviewed-by: Kevin Tian <kevin.tian@intel.com> Tested-by: Terrence Xu <terrence.xu@intel.com> Tested-by: Eric Farman <farman@linux.ibm.com> Signed-off-by: Nicolin Chen <nicolinc@nvidia.com> Link: https://lore.kernel.org/r/20220723020256.30081-9-nicolinc@nvidia.com Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
1 parent 1331460 commit 8561aa4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

drivers/vfio/vfio.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2012,13 +2012,13 @@ EXPORT_SYMBOL(vfio_unpin_pages);
20122012
* not a real device DMA, it is not necessary to pin the user space memory.
20132013
*
20142014
* @device [in] : VFIO device
2015-
* @user_iova [in] : base IOVA of a user space buffer
2015+
* @iova [in] : base IOVA of a user space buffer
20162016
* @data [in] : pointer to kernel buffer
20172017
* @len [in] : kernel buffer length
20182018
* @write : indicate read or write
20192019
* Return error code on failure or 0 on success.
20202020
*/
2021-
int vfio_dma_rw(struct vfio_device *device, dma_addr_t user_iova, void *data,
2021+
int vfio_dma_rw(struct vfio_device *device, dma_addr_t iova, void *data,
20222022
size_t len, bool write)
20232023
{
20242024
struct vfio_container *container;
@@ -2034,7 +2034,7 @@ int vfio_dma_rw(struct vfio_device *device, dma_addr_t user_iova, void *data,
20342034

20352035
if (likely(driver && driver->ops->dma_rw))
20362036
ret = driver->ops->dma_rw(container->iommu_data,
2037-
user_iova, data, len, write);
2037+
iova, data, len, write);
20382038
else
20392039
ret = -ENOTTY;
20402040
return ret;

include/linux/vfio.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ bool vfio_file_has_dev(struct file *file, struct vfio_device *device);
164164
int vfio_pin_pages(struct vfio_device *device, dma_addr_t iova,
165165
int npage, int prot, unsigned long *phys_pfn);
166166
void vfio_unpin_pages(struct vfio_device *device, dma_addr_t iova, int npage);
167-
int vfio_dma_rw(struct vfio_device *device, dma_addr_t user_iova,
167+
int vfio_dma_rw(struct vfio_device *device, dma_addr_t iova,
168168
void *data, size_t len, bool write);
169169

170170
/*

0 commit comments

Comments
 (0)