linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Alyssa Rosenzweig <alyssa@rosenzweig.io>
To: Robin Murphy <robin.murphy@arm.com>
Cc: Sven Peter <sven@svenpeter.dev>, Janne Grunau <j@jannau.net>,
	Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>,
	asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
	iommu@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/5] iommu/dart: Set DMA domain for locked DARTs
Date: Tue, 11 Feb 2025 13:40:05 -0500	[thread overview]
Message-ID: <Z6uZhQtPAE8Ck_b0@blossom> (raw)
In-Reply-To: <1d6b3fe7-9376-422b-a2e6-ebaed7b6cd75@arm.com>

Hi Robin,

> > This is required.
> 
> Now that we can, I'd really rather do this properly and not offer an
> identity domain in the first place when it's not available.

I'm reading through iommu.c but I don't see a way to avoid offering an
identity domain without the DMA override here, just reading through the
logic of iommu_get_default_domain_type. Could you point me to what you
have in mind?

Thanks,
Alyssa

> > --- a/drivers/iommu/apple-dart.c
> > +++ b/drivers/iommu/apple-dart.c
> > @@ -941,6 +941,8 @@ static int apple_dart_def_domain_type(struct device *dev)
> >   		return IOMMU_DOMAIN_IDENTITY;
> >   	if (!cfg->stream_maps[0].dart->supports_bypass)
> >   		return IOMMU_DOMAIN_DMA;
> > +	if (cfg->stream_maps[0].dart->locked)
> > +		return IOMMU_DOMAIN_DMA;
> >   	return 0;
> >   }
> > 
> 


  reply	other threads:[~2025-02-11 18:52 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-10 19:39 [PATCH 0/5] iommu: apple-dart: Support locked DARTs Alyssa Rosenzweig
2025-02-10 19:39 ` [PATCH 1/5] iommu/dart: Track if the DART is locked Alyssa Rosenzweig
2025-02-10 19:39 ` [PATCH 2/5] iommu/dart: Skip reset for locked DARTs Alyssa Rosenzweig
2025-02-11 18:34   ` Robin Murphy
2025-02-11 18:44     ` Alyssa Rosenzweig
2025-02-10 19:39 ` [PATCH 3/5] iommu/dart: Set DMA domain " Alyssa Rosenzweig
2025-02-11 18:25   ` Robin Murphy
2025-02-11 18:40     ` Alyssa Rosenzweig [this message]
2025-02-11 20:37       ` Robin Murphy
2025-02-10 19:39 ` [PATCH 4/5] iommu/dart: Reject identity " Alyssa Rosenzweig
2025-02-11  6:07   ` Nick Chan
2025-02-11 12:17     ` Alyssa Rosenzweig
2025-02-10 19:39 ` [PATCH 5/5] iommu/dart: Assert !locked when configuring Alyssa Rosenzweig
2025-02-11 18:41   ` Robin Murphy
2025-02-11 19:20     ` Alyssa Rosenzweig
2025-02-11 19:21     ` Janne Grunau
2025-02-11 21:13       ` Robin Murphy
2025-02-10 19:48 ` [PATCH 0/5] iommu: apple-dart: Support locked DARTs Neal Gompa

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=Z6uZhQtPAE8Ck_b0@blossom \
    --to=alyssa@rosenzweig.io \
    --cc=asahi@lists.linux.dev \
    --cc=iommu@lists.linux.dev \
    --cc=j@jannau.net \
    --cc=joro@8bytes.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=sven@svenpeter.dev \
    --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;
as well as URLs for NNTP newsgroup(s).