From: Christoph Hellwig <hch@lst•de>
To: Robin Murphy <robin.murphy@arm•com>
Cc: Jason Gunthorpe <jgg@nvidia•com>,
"Tian, Kevin" <kevin.tian@intel•com>,
Christoph Hellwig <hch@lst•de>,
Alex Williamson <alex.williamson@redhat•com>,
Lu Baolu <baolu.lu@linux•intel.com>,
Christian Benvenuti <benve@cisco•com>,
Cornelia Huck <cohuck@redhat•com>,
David Woodhouse <dwmw2@infradead•org>,
Gerald Schaefer <gerald.schaefer@linux•ibm.com>,
"iommu@lists•linux-foundation.org"
<iommu@lists•linux-foundation.org>,
Jason Wang <jasowang@redhat•com>, Joerg Roedel <joro@8bytes•org>,
"kvm@vger•kernel.org" <kvm@vger•kernel.org>,
"linux-arm-kernel@lists•infradead.org"
<linux-arm-kernel@lists•infradead.org>,
"linux-arm-msm@vger•kernel.org" <linux-arm-msm@vger•kernel.org>,
"linux-rdma@vger•kernel.org" <linux-rdma@vger•kernel.org>,
"linux-s390@vger•kernel.org" <linux-s390@vger•kernel.org>,
Matthew Rosato <mjrosato@linux•ibm.com>,
"Michael S. Tsirkin" <mst@redhat•com>,
Nelson Escobar <neescoba@cisco•com>,
"netdev@vger•kernel.org" <netdev@vger•kernel.org>,
Rob Clark <robdclark@gmail•com>,
Suravee Suthikulpanit <suravee.suthikulpanit@amd•com>,
"virtualization@lists•linux-foundation.org"
<virtualization@lists•linux-foundation.org>,
Will Deacon <will@kernel•org>
Subject: Re: [PATCH 1/5] iommu: Replace uses of IOMMU_CAP_CACHE_COHERENCY with dev_is_dma_coherent()
Date: Thu, 7 Apr 2022 17:31:03 +0200 [thread overview]
Message-ID: <20220407153103.GA15336@lst.de> (raw)
In-Reply-To: <fb55a025-348e-800c-e368-48be075d8e9c@arm.com>
On Thu, Apr 07, 2022 at 04:17:11PM +0100, Robin Murphy wrote:
>> My take is that the drivers using this API are doing it to make sure
>> their HW blocks are setup in a way that is consistent with the DMA API
>> they are also using, and run in constrained embedded-style
>> environments that know the firmware support is present.
>>
>> So in the end it does not seem suitable right now for linking to
>> IOMMU_CACHE..
>
> That seems a pretty good summary - I think they're basically all "firmware
> told Linux I'm coherent so I'd better act coherent" cases, but that still
> doesn't necessarily mean that they're *forced* to respect that.
Yes. And the interface is horribly misnamed for that. I'll see what
I can do to clean this up as I've noticed various other not very
nice things in that area.
> One of the
> things on my to-do list is to try adding a DMA_ATTR_NO_SNOOP that can force
> DMA cache maintenance for coherent devices, primarily to hook up in
> Panfrost (where there is a bit of a performance to claw back on the
> coherent AmLogic SoCs by leaving certain buffers non-cacheable).
This has been an explicit request from the amdgpu folks and thus been
on my TODO list for quite a while as well. Note that I don't think it
should be a flag to dma_alloc_attrs, but rather for dma_alloc_pages
as the drivers that want non-snoop generally also want to actually
be able to deal with pages.
next prev parent reply other threads:[~2022-04-07 15:32 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-05 16:15 [PATCH 0/5] Make the iommu driver no-snoop block feature consistent Jason Gunthorpe
2022-04-05 16:16 ` [PATCH 1/5] iommu: Replace uses of IOMMU_CAP_CACHE_COHERENCY with dev_is_dma_coherent() Jason Gunthorpe
2022-04-06 5:30 ` Christoph Hellwig
2022-04-06 12:07 ` Jason Gunthorpe
2022-04-06 13:51 ` Christoph Hellwig
2022-04-06 14:14 ` Jason Gunthorpe
2022-04-06 15:47 ` Christoph Hellwig
2022-04-06 15:48 ` Jason Gunthorpe
2022-04-06 15:48 ` Robin Murphy
2022-04-06 13:56 ` Robin Murphy
2022-04-06 14:24 ` Jason Gunthorpe
2022-04-06 15:18 ` Jason Gunthorpe
2022-04-06 15:50 ` Christoph Hellwig
2022-04-06 16:06 ` Jason Gunthorpe
2022-04-06 16:10 ` Christoph Hellwig
2022-04-06 17:17 ` Jason Gunthorpe
2022-04-07 7:18 ` Tian, Kevin
2022-04-07 13:59 ` Jason Gunthorpe
2022-04-07 15:17 ` Robin Murphy
2022-04-07 15:23 ` Jason Gunthorpe
2022-04-07 22:37 ` Alex Williamson
2022-04-07 15:31 ` Christoph Hellwig [this message]
2022-04-07 8:53 ` Niklas Schnelle
2022-04-05 16:16 ` [PATCH 2/5] vfio: Require that devices support DMA cache coherence Jason Gunthorpe
2022-04-05 19:10 ` Alex Williamson
2022-04-05 19:29 ` Jason Gunthorpe
2022-04-06 7:02 ` Tian, Kevin
2022-04-07 14:53 ` Jason Gunthorpe
2022-04-05 16:16 ` [PATCH 3/5] iommu: Introduce the domain op enforce_cache_coherency() Jason Gunthorpe
2022-04-05 19:50 ` Alex Williamson
2022-04-05 22:57 ` Jason Gunthorpe
2022-04-05 23:31 ` Tian, Kevin
2022-04-06 0:08 ` Tian, Kevin
2022-04-06 7:09 ` Tian, Kevin
2022-04-06 12:27 ` Jason Gunthorpe
2022-04-05 16:16 ` [PATCH 4/5] vfio: Move the Intel no-snoop control off of IOMMU_CACHE Jason Gunthorpe
2022-04-05 16:16 ` [PATCH 5/5] iommu: Delete IOMMU_CAP_CACHE_COHERENCY Jason Gunthorpe
2022-04-06 6:52 ` [PATCH 0/5] Make the iommu driver no-snoop block feature consistent Tian, Kevin
2022-04-07 14:56 ` Jason Gunthorpe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220407153103.GA15336@lst.de \
--to=hch@lst$(echo .)de \
--cc=alex.williamson@redhat$(echo .)com \
--cc=baolu.lu@linux$(echo .)intel.com \
--cc=benve@cisco$(echo .)com \
--cc=cohuck@redhat$(echo .)com \
--cc=dwmw2@infradead$(echo .)org \
--cc=gerald.schaefer@linux$(echo .)ibm.com \
--cc=iommu@lists$(echo .)linux-foundation.org \
--cc=jasowang@redhat$(echo .)com \
--cc=jgg@nvidia$(echo .)com \
--cc=joro@8bytes$(echo .)org \
--cc=kevin.tian@intel$(echo .)com \
--cc=kvm@vger$(echo .)kernel.org \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
--cc=linux-arm-msm@vger$(echo .)kernel.org \
--cc=linux-rdma@vger$(echo .)kernel.org \
--cc=linux-s390@vger$(echo .)kernel.org \
--cc=mjrosato@linux$(echo .)ibm.com \
--cc=mst@redhat$(echo .)com \
--cc=neescoba@cisco$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=robdclark@gmail$(echo .)com \
--cc=robin.murphy@arm$(echo .)com \
--cc=suravee.suthikulpanit@amd$(echo .)com \
--cc=virtualization@lists$(echo .)linux-foundation.org \
--cc=will@kernel$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox