Linux IOMMU Development
 help / color / mirror / Atom feed
From: Robin Murphy <robin.murphy@arm.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Leon Romanovsky <leon@kernel.org>, Joerg Roedel <joro@8bytes.org>,
	Will Deacon <will@kernel.org>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Leon Romanovsky <leonro@nvidia.com>,
	Easwar Hariharan <eahariha@linux.microsoft.com>,
	linux-kernel@vger.kernel.org, iommu@lists.linux.dev,
	Jason Gunthorpe <jgg@nvidia.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH v4 2/2] dma: add IOMMU static calls with clear default ops
Date: Tue, 27 Aug 2024 12:57:58 +0100	[thread overview]
Message-ID: <f803659b-d98a-4472-98e4-7deebb9df45f@arm.com> (raw)
In-Reply-To: <20240820122240.GA17459@lst.de>

On 20/08/2024 1:22 pm, Christoph Hellwig wrote:
> On Mon, Aug 19, 2024 at 02:16:56PM +0100, Robin Murphy wrote:
>> Thanks, I've just had a quick look over what you queued on
>> dma-iommu-direct-calls, and you're welcome to stick my ack on that if you
>> like.
> 
> Yes, thank you a lot for your review!
> 
> While I have your attention - with these two patches we stop building
> dummy_dma_ops for most common configs.  Do you think we need additional
> safeguards for this case?  My idea would be to remove them and force the
> bus_dma_mask to zero where we currently set the dummy ops, but I could
> use a little reality check for that idea.

Yeah, the dummy ops were a nice idea at the time, but have been looking 
increasingly anachronistic for a while - in fact I think they're 
effectively broken already now, since if arm64 stops selecting DMA_OPS 
via IOMMU_DMA then the set_dma_ops() in the ACPI path isn't going to be 
effective anyway.

I certainly don't hate the idea of using bus_dma_limit as the next most 
functionally robust way to deny DMA for now. It would probably be a bit 
awkward to upheave the existing notion of 0 meaning no limit, but 
setting it to 1 would have the desired effect in practice (at least with 
dma-direct), plus would look nicely deliberate - for completeness we'd 
probably just want an extra check or two in the right place(s) to ensure 
that such a DMA-denied device still can't end up being given ops other 
than dma-direct, but that seems simple enough.

Thanks,
Robin.

  reply	other threads:[~2024-08-27 11:58 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-24 18:04 [PATCH v4 0/2] DMA IOMMU static calls Leon Romanovsky
2024-07-24 18:04 ` [PATCH v4 1/2] dma: call unconditionally to unmap_page and unmap_sg callbacks Leon Romanovsky
2024-08-13 12:23   ` Robin Murphy
2024-07-24 18:04 ` [PATCH v4 2/2] dma: add IOMMU static calls with clear default ops Leon Romanovsky
2024-08-15 16:54   ` Robin Murphy
2024-08-15 17:06     ` Leon Romanovsky
2024-08-16  7:11     ` Christoph Hellwig
2024-08-16  8:13       ` Christoph Hellwig
2024-08-19 13:16       ` Robin Murphy
2024-08-20 12:22         ` Christoph Hellwig
2024-08-27 11:57           ` Robin Murphy [this message]
2024-09-04 14:59   ` Nícolas F. R. A. Prado
2024-09-04 15:45     ` Leon Romanovsky
2024-09-04 17:58       ` Nícolas F. R. A. Prado
2024-09-04 18:02         ` Leon Romanovsky
2024-09-10 19:01   ` Nícolas F. R. A. Prado
2024-09-11  6:43     ` Leon Romanovsky
2024-09-11  8:04       ` Christoph Hellwig
2024-09-11  9:05         ` Leon Romanovsky
2024-08-05 12:20 ` [PATCH v4 0/2] DMA IOMMU static calls Leon Romanovsky
2024-08-13  9:58   ` Greg Kroah-Hartman
2024-08-13 11:50     ` Christoph Hellwig

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=f803659b-d98a-4472-98e4-7deebb9df45f@arm.com \
    --to=robin.murphy@arm.com \
    --cc=eahariha@linux.microsoft.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hch@lst.de \
    --cc=iommu@lists.linux.dev \
    --cc=jgg@nvidia.com \
    --cc=joro@8bytes.org \
    --cc=leon@kernel.org \
    --cc=leonro@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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