[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YsXg10vCMBMaOM9V@Asurada-Nvidia>
Date: Wed, 6 Jul 2022 12:21:59 -0700
From: Nicolin Chen <nicolinc@...dia.com>
To: Jason Gunthorpe <jgg@...dia.com>
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>, <kevin.tian@...el.com>, <hch@...radead.org>,
<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 v2 4/9] vfio: Pass in starting IOVA to
vfio_pin/unpin_pages API
On Wed, Jul 06, 2022 at 02:49:23PM -0300, Jason Gunthorpe wrote:
> On Tue, Jul 05, 2022 at 11:27:54PM -0700, Nicolin Chen wrote:
>
> > These functions call back into the back-end IOMMU module by using the pin_pages
> > diff --git a/drivers/gpu/drm/i915/gvt/kvmgt.c b/drivers/gpu/drm/i915/gvt/kvmgt.c
> > index 8c67c9aba82d..ea6041fa48ac 100644
> > --- a/drivers/gpu/drm/i915/gvt/kvmgt.c
> > +++ b/drivers/gpu/drm/i915/gvt/kvmgt.c
> > + vfio_unpin_pages(&vgpu->vfio_device, gfn << PAGE_SHIFT,
> > + roundup(size, PAGE_SIZE) / PAGE_SIZE);
>
> These maths are DIV_ROUND_UP()
Actually I see two places in this file doing the same roundup.
So I am going to add a prep patch in v3 to fix them separately.
Powered by blists - more mailing lists