[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190529152355.5ea4823f@x1.home>
Date: Wed, 29 May 2019 15:23:55 -0600
From: Alex Williamson <alex.williamson@...hat.com>
To: "Thomas Meyer" <thomas@...3r.de>
Cc: kvm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] vfio-pci/nvlink2: Use vma_pages function instead of
explicit computation
On Wed, 29 May 2019 22:11:06 +0200
"Thomas Meyer" <thomas@...3r.de> wrote:
> Use vma_pages function on vma object instead of explicit computation.
>
> Signed-off-by: Thomas Meyer <thomas@...3r.de>
> ---
>
> diff -u -p a/drivers/vfio/pci/vfio_pci_nvlink2.c b/drivers/vfio/pci/vfio_pci_nvlink2.c
> --- a/drivers/vfio/pci/vfio_pci_nvlink2.c
> +++ b/drivers/vfio/pci/vfio_pci_nvlink2.c
> @@ -161,7 +161,7 @@ static int vfio_pci_nvgpu_mmap(struct vf
>
> atomic_inc(&data->mm->mm_count);
> ret = (int) mm_iommu_newdev(data->mm, data->useraddr,
> - (vma->vm_end - vma->vm_start) >> PAGE_SHIFT,
> + vma_pages(vma),
> data->gpu_hpa, &data->mem);
>
> trace_vfio_pci_nvgpu_mmap(vdev->pdev, data->gpu_hpa, data->useraddr,
Not sure if our emails crossed in flight[1], but the other patch[2]
still has precedence. You're welcome to add a reviewed-by. Thanks,
Alex
[1]https://lkml.org/lkml/2019/5/29/871
[2]https://lkml.org/lkml/2019/5/16/658
Powered by blists - more mailing lists