[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z35r54_zgpmO6FQ-@google.com>
Date: Wed, 8 Jan 2025 12:13:27 +0000
From: Mostafa Saleh <smostafa@...gle.com>
To: Jason Gunthorpe <jgg@...pe.ca>
Cc: Robin Murphy <robin.murphy@....com>, iommu@...ts.linux.dev,
kvmarm@...ts.linux.dev, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, catalin.marinas@....com,
will@...nel.org, maz@...nel.org, oliver.upton@...ux.dev,
joey.gouly@....com, suzuki.poulose@....com, yuzenghui@...wei.com,
robdclark@...il.com, joro@...tes.org, jean-philippe@...aro.org,
nicolinc@...dia.com, vdonnefort@...gle.com, qperret@...gle.com,
tabba@...gle.com, danielmentz@...gle.com, tzukui@...gle.com
Subject: Re: [RFC PATCH v2 55/58] drivers/iommu: Add deferred map_sg
operations
On Fri, Jan 03, 2025 at 11:47:57AM -0400, Jason Gunthorpe wrote:
> On Fri, Jan 03, 2025 at 03:35:20PM +0000, Mostafa Saleh wrote:
>
> > An alternative approach as Robin suggested, is to treat all iommu_map as sg map,
> > and when the driver gets the iotlb_sync_map() call it can just issue the hypercall,
> > however this call only provides the IOVA range, which requires extra work or locking
> > as mentioned in the thread, and as Robin mentioned s390 doing something similar,
> > I was highlighting that in their driver, this call only notifies the hypervisor
> > about an IOVA and not an actual pv map as pKVM, so it much simpler in their case.
>
> Oh, that is much clearer, maybe incorporate some of that into the
> commit message.
Sure.
>
> We are going in a general direction of trying to make the fast dma
> mapping path not require sg, so adding sg specific optimizations to
> the low level driver is not good.
>
> Batching the hypercalls in the gather and then flushing to execute the
> batch seems more reasonable.
>
> You could probably work on advancing this infrastructure separately
> via virtio-iommu..
That was my impression also, I mentioned it in the commit message,
but for virtio-iommu we need a change in the standard to define this
operation, I can look into that.
Thanks,
Mostafa
>
> Jason
Powered by blists - more mailing lists