[PATCH v3 00/10] Update vfio_pin/unpin_pages API

Nicolin Chen nicolinc at nvidia.com
Fri Jul 22 23:12:19 UTC 2022


On Fri, Jul 22, 2022 at 04:11:29PM -0600, Alex Williamson wrote:

> GVT-g explodes for me with this series on my Broadwell test system,
> continuously spewing the following:

Thank you for running additional tests.

> [   47.348778] WARNING: CPU: 3 PID: 501 at drivers/vfio/vfio_iommu_type1.c:978 vfio_iommu_type1_unpin_pages+0x7b/0x100 [vfio_iommu_type1]
 
> Line 978 is the WARN_ON(i != npage) line.  For the cases where we don't
> find a matching vfio_dma, I'm seeing addresses that look maybe like
> we're shifting  a value that's already an iova by PAGE_SHIFT somewhere.

Hmm..I don't understand the PAGE_SHIFT part. Do you mind clarifying?

And GVT code initiated an unpin request from gvt_unpin_guest_pag()
that is currently unpinning one page at a time on a contiguous IOVA
range, prior to this series. After this series, it leaves the per-
page routine to the internal loop of vfio_iommu_type1_unpin_pages(),
which is supposed to do the same.

So, either resulted from the npage input being wrong or some other
factor weighed in that invoked a vfio_remove_dma on those iovas?

Thanks
Nic


More information about the dri-devel mailing list