Message ID | 20180713115419.1270c385@canb.auug.org.au (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hi all, On Fri, 13 Jul 2018 11:54:19 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote: > > [Dave cc'd because this will probably turn up in the drm tree soon.] And now it has ... > After merging the drm-intel tree, today's linux-next build (x86_64 > allmodconfig) failed like this: > > drivers/gpu/drm/i915/gvt/kvmgt.c: In function 'gvt_dma_map_page': > drivers/gpu/drm/i915/gvt/kvmgt.c:188:17: error: 'pfn' undeclared (first use in this function); did you mean 'gfn'? > if (!pfn_valid(pfn)) { > ^~~ > > Caused by commit > > 79e542f5af79 ("drm/i915/kvmgt: Support setting dma map for huge pages") > > interacting with commit > > 39b4cbadb9a9 ("drm/i915/kvmgt: Check the pfn got from vfio_pin_pages") > > from Linus' tree (v4.18-rc1). > > I added the following merge fix patch: > > From: Stephen Rothwell <sfr@canb.auug.org.au> > Date: Fri, 13 Jul 2018 11:48:41 +1000 > Subject: [PATCH] drm/i915/kvmgt: merge fixup for "Check the pfn got from > vfio_pin_pages" > > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> > --- > drivers/gpu/drm/i915/gvt/kvmgt.c | 6 ------ > 1 file changed, 6 deletions(-) > > diff --git a/drivers/gpu/drm/i915/gvt/kvmgt.c b/drivers/gpu/drm/i915/gvt/kvmgt.c > index 718ab307a500..4d2f53ae9f0f 100644 > --- a/drivers/gpu/drm/i915/gvt/kvmgt.c > +++ b/drivers/gpu/drm/i915/gvt/kvmgt.c > @@ -185,12 +185,6 @@ static int gvt_dma_map_page(struct intel_vgpu *vgpu, unsigned long gfn, > if (ret) > return ret; > > - if (!pfn_valid(pfn)) { > - gvt_vgpu_err("pfn 0x%lx is not mem backed\n", pfn); > - vfio_unpin_pages(mdev_dev(vgpu->vdev.mdev), &gfn, 1); > - return -EINVAL; > - } > - > /* Setup DMA mapping. */ > *dma_addr = dma_map_page(dev, page, 0, size, PCI_DMA_BIDIRECTIONAL); > ret = dma_mapping_error(dev, *dma_addr);
diff --git a/drivers/gpu/drm/i915/gvt/kvmgt.c b/drivers/gpu/drm/i915/gvt/kvmgt.c index 718ab307a500..4d2f53ae9f0f 100644 --- a/drivers/gpu/drm/i915/gvt/kvmgt.c +++ b/drivers/gpu/drm/i915/gvt/kvmgt.c @@ -185,12 +185,6 @@ static int gvt_dma_map_page(struct intel_vgpu *vgpu, unsigned long gfn, if (ret) return ret; - if (!pfn_valid(pfn)) { - gvt_vgpu_err("pfn 0x%lx is not mem backed\n", pfn); - vfio_unpin_pages(mdev_dev(vgpu->vdev.mdev), &gfn, 1); - return -EINVAL; - } - /* Setup DMA mapping. */ *dma_addr = dma_map_page(dev, page, 0, size, PCI_DMA_BIDIRECTIONAL); ret = dma_mapping_error(dev, *dma_addr);