[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Yqz42ApyYoj3TUll@Asurada-Nvidia>
Date: Fri, 17 Jun 2022 14:57:44 -0700
From: Nicolin Chen <nicolinc@...dia.com>
To: Christoph Hellwig <hch@...radead.org>
CC: <kwankhede@...dia.com>, <corbet@....net>, <hca@...ux.ibm.com>,
<gor@...ux.ibm.com>, <agordeev@...ux.ibm.com>,
<borntraeger@...ux.ibm.com>, <svens@...ux.ibm.com>,
<zhenyuw@...ux.intel.com>, <zhi.a.wang@...el.com>,
<jani.nikula@...ux.intel.com>, <joonas.lahtinen@...ux.intel.com>,
<rodrigo.vivi@...el.com>, <tvrtko.ursulin@...ux.intel.com>,
<airlied@...ux.ie>, <daniel@...ll.ch>, <farman@...ux.ibm.com>,
<mjrosato@...ux.ibm.com>, <pasic@...ux.ibm.com>,
<vneethv@...ux.ibm.com>, <oberpar@...ux.ibm.com>,
<freude@...ux.ibm.com>, <akrowiak@...ux.ibm.com>,
<jjherne@...ux.ibm.com>, <alex.williamson@...hat.com>,
<cohuck@...hat.com>, <jgg@...dia.com>, <kevin.tian@...el.com>,
<jchrist@...ux.ibm.com>, <kvm@...r.kernel.org>,
<linux-doc@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linux-s390@...r.kernel.org>,
<intel-gvt-dev@...ts.freedesktop.org>,
<intel-gfx@...ts.freedesktop.org>,
<dri-devel@...ts.freedesktop.org>
Subject: Re: [RFT][PATCH v1 3/6] vfio: Pass in starting IOVA to
vfio_pin/unpin_pages API
On Fri, Jun 17, 2022 at 01:42:42AM -0700, Christoph Hellwig wrote:
> On Thu, Jun 16, 2022 at 04:52:09PM -0700, Nicolin Chen wrote:
> > + ret = vfio_unpin_pages(&vgpu->vfio_device, gfn << PAGE_SHIFT, npage);
> > + drm_WARN_ON(&i915->drm, ret != npage);
>
> The shifting of gfn seems to happen bother here and in the callers.
>
> Also this is the only caller that does anything withthe vfio_unpin_pages
> return value. Given that you touch the API here we might as well
> not return any value, and turn the debug checks that can return errors
> into WARN_ON_ONCE calls the vfio/iommu_type1 code.
Thanks for the suggestion. I will do that.
> > +extern int vfio_pin_pages(struct vfio_device *device, dma_addr_t iova,
> > int npage, int prot, unsigned long *phys_pfn);
> > -extern int vfio_unpin_pages(struct vfio_device *device, unsigned long *user_pfn,
> > +extern int vfio_unpin_pages(struct vfio_device *device, dma_addr_t iova,
> > int npage);
>
> This will clash with the extern removal patch that Alex has sent.
And I will rebase on top of Alex's change.
Powered by blists - more mailing lists