mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 07:04:24 +00:00
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>
This commit is contained in:
parent
1331460514
commit
8561aa4fb7
2 changed files with 4 additions and 4 deletions
|
@ -2012,13 +2012,13 @@ EXPORT_SYMBOL(vfio_unpin_pages);
|
||||||
* not a real device DMA, it is not necessary to pin the user space memory.
|
* not a real device DMA, it is not necessary to pin the user space memory.
|
||||||
*
|
*
|
||||||
* @device [in] : VFIO device
|
* @device [in] : VFIO device
|
||||||
* @user_iova [in] : base IOVA of a user space buffer
|
* @iova [in] : base IOVA of a user space buffer
|
||||||
* @data [in] : pointer to kernel buffer
|
* @data [in] : pointer to kernel buffer
|
||||||
* @len [in] : kernel buffer length
|
* @len [in] : kernel buffer length
|
||||||
* @write : indicate read or write
|
* @write : indicate read or write
|
||||||
* Return error code on failure or 0 on success.
|
* Return error code on failure or 0 on success.
|
||||||
*/
|
*/
|
||||||
int vfio_dma_rw(struct vfio_device *device, dma_addr_t user_iova, void *data,
|
int vfio_dma_rw(struct vfio_device *device, dma_addr_t iova, void *data,
|
||||||
size_t len, bool write)
|
size_t len, bool write)
|
||||||
{
|
{
|
||||||
struct vfio_container *container;
|
struct vfio_container *container;
|
||||||
|
@ -2034,7 +2034,7 @@ int vfio_dma_rw(struct vfio_device *device, dma_addr_t user_iova, void *data,
|
||||||
|
|
||||||
if (likely(driver && driver->ops->dma_rw))
|
if (likely(driver && driver->ops->dma_rw))
|
||||||
ret = driver->ops->dma_rw(container->iommu_data,
|
ret = driver->ops->dma_rw(container->iommu_data,
|
||||||
user_iova, data, len, write);
|
iova, data, len, write);
|
||||||
else
|
else
|
||||||
ret = -ENOTTY;
|
ret = -ENOTTY;
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
@ -164,7 +164,7 @@ bool vfio_file_has_dev(struct file *file, struct vfio_device *device);
|
||||||
int vfio_pin_pages(struct vfio_device *device, dma_addr_t iova,
|
int vfio_pin_pages(struct vfio_device *device, dma_addr_t iova,
|
||||||
int npage, int prot, unsigned long *phys_pfn);
|
int npage, int prot, unsigned long *phys_pfn);
|
||||||
void vfio_unpin_pages(struct vfio_device *device, dma_addr_t iova, int npage);
|
void vfio_unpin_pages(struct vfio_device *device, dma_addr_t iova, int npage);
|
||||||
int vfio_dma_rw(struct vfio_device *device, dma_addr_t user_iova,
|
int vfio_dma_rw(struct vfio_device *device, dma_addr_t iova,
|
||||||
void *data, size_t len, bool write);
|
void *data, size_t len, bool write);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue