[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190527160355.1cd446c4.cohuck@redhat.com>
Date: Mon, 27 May 2019 16:03:55 +0200
From: Cornelia Huck <cohuck@...hat.com>
To: "Thomas Meyer" <thomas@...3r.de>
Cc: alex.williamson@...hat.com, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: your patch
On Sun, 26 May 2019 13:44:04 +0200
"Thomas Meyer" <thomas@...3r.de> wrote:
> From thomas@...3r.de Sun May 26 00:13:26 2019
> Subject: [PATCH] vfio-pci/nvlink2: Use vma_pages function instead of explicit
> computation
> To: alex.williamson@...hat.com, kvm@...r.kernel.org, linux-kernel@...r.kernel.org
> Content-Type: text/plain; charset="UTF-8"
> Mime-Version: 1.0
> Content-Transfer-Encoding: 8bit
> X-Patch: Cocci
> X-Mailer: DiffSplit
> Message-ID: <1558822461341-1674464153-1-diffsplit-thomas@...3r.de>
> References: <1558822461331-726613767-0-diffsplit-thomas@...3r.de>
> In-Reply-To: <1558822461331-726613767-0-diffsplit-thomas@...3r.de>
> X-Serial-No: 1
Hi,
some kind of accident seems to have happened to your patch... maybe the
missing colon after the 'From'?
>
> 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,
The change looks good to me.
Reviewed-by: Cornelia Huck <cohuck@...hat.com>
Powered by blists - more mailing lists