[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z6uZhQtPAE8Ck_b0@blossom>
Date: Tue, 11 Feb 2025 13:40:05 -0500
From: Alyssa Rosenzweig <alyssa@...enzweig.io>
To: Robin Murphy <robin.murphy@....com>
Cc: Sven Peter <sven@...npeter.dev>, Janne Grunau <j@...nau.net>,
Joerg Roedel <joro@...tes.org>, Will Deacon <will@...nel.org>,
asahi@...ts.linux.dev, linux-arm-kernel@...ts.infradead.org,
iommu@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/5] iommu/dart: Set DMA domain for locked DARTs
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;
> > }
> >
>
Powered by blists - more mailing lists