public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia•com>
To: Janne Grunau <j@jannau•net>
Cc: linux-arm-kernel@lists•infradead.org,
	Kevin Tian <kevin.tian@intel•com>, Will Deacon <will@kernel•org>,
	Sven Peter <sven@svenpeter•dev>,
	linuxppc-dev@lists•ozlabs.org, Joerg Roedel <joro@8bytes•org>,
	Hector Martin <marcan@marcan•st>,
	Nicholas Piggin <npiggin@gmail•com>,
	Robin Murphy <robin.murphy@arm•com>,
	iommu@lists•linux.dev, asahi@lists•linux.dev,
	David Woodhouse <dwmw2@infradead•org>,
	Alyssa Rosenzweig <alyssa@rosenzweig•io>,
	Lu Baolu <baolu.lu@linux•intel.com>
Subject: Re: [PATCH 6/8] iommu/dart: Move the blocked domain support to a global static
Date: Wed, 27 Sep 2023 09:59:25 -0300	[thread overview]
Message-ID: <20230927125925.GT13733@nvidia.com> (raw)
In-Reply-To: <ZRMrZJ1HgpULWeyv@robin>

On Tue, Sep 26, 2023 at 09:05:08PM +0200, Janne Grunau wrote:
> > +static int apple_dart_attach_dev_blocked(struct iommu_domain *domain,
> > +					 struct device *dev)
> > +{
> > +	struct apple_dart_master_cfg *cfg = dev_iommu_priv_get(dev);
> > +	struct apple_dart_stream_map *stream_map;
> > +	int i;
> > +
> > +	if (cfg->stream_maps[0].dart->force_bypass)
> > +		return -EINVAL;
> 
> unrelated to this change as this keeps the current behavior but I think
> force_bypass should not override IOMMU_DOMAIN_BLOCKED.

That would be great, dart is the only driver that can fail blocked..

> It is set if the CPU page size is smaller than dart's page
> size. Obviously dart can't translate in that situation but it should
> be still possible to block it completely.

Wonderful, actually it probably shouldn't even support allocating a
paging domain if it can't support PAGE_SIZE mappings?

> How do we manage this? I can write a patch either to the current state
> or based on this series.

Let me just add a patch to this series to remove that test with your
explanation, that will avoid patch ordering troubles.

Thanks,
Jason

  parent reply	other threads:[~2023-09-27 13:00 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-22 17:07 [PATCH 0/8] iommu: Convert dart & iommufd to the new domain_alloc_paging() Jason Gunthorpe
2023-09-22 17:07 ` [PATCH 1/8] iommu: Move IOMMU_DOMAIN_BLOCKED global statics to ops->blocked_domain Jason Gunthorpe
2023-09-25  2:26   ` Baolu Lu
2023-09-22 17:07 ` [PATCH 2/8] iommu/vt-d: Update the definition of the blocking domain Jason Gunthorpe
2023-09-25  2:27   ` Baolu Lu
2023-09-22 17:07 ` [PATCH 3/8] iommu/vt-d: Use ops->blocked_domain Jason Gunthorpe
2023-09-25  2:29   ` Baolu Lu
2023-09-25 11:41     ` Jason Gunthorpe
2023-09-26  3:28       ` Baolu Lu
2023-09-22 17:07 ` [PATCH 4/8] iommufd: Convert to alloc_domain_paging() Jason Gunthorpe
2023-09-22 17:07 ` [PATCH 5/8] iommu/dart: Use static global identity domains Jason Gunthorpe
2023-09-22 17:07 ` [PATCH 6/8] iommu/dart: Move the blocked domain support to a global static Jason Gunthorpe
2023-09-26 19:05   ` Janne Grunau
2023-09-26 19:34     ` Robin Murphy
2023-09-26 19:41       ` Robin Murphy
2023-09-27 12:59     ` Jason Gunthorpe [this message]
2023-09-22 17:07 ` [PATCH 7/8] iommu/dart: Convert to domain_alloc_paging() Jason Gunthorpe
2023-09-26 19:06   ` Janne Grunau
2023-09-22 17:07 ` [PATCH 8/8] iommu/dart: Call apple_dart_finalize_domain() as part of alloc_paging() Jason Gunthorpe
2023-09-26 19:07   ` Janne Grunau

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=20230927125925.GT13733@nvidia.com \
    --to=jgg@nvidia$(echo .)com \
    --cc=alyssa@rosenzweig$(echo .)io \
    --cc=asahi@lists$(echo .)linux.dev \
    --cc=baolu.lu@linux$(echo .)intel.com \
    --cc=dwmw2@infradead$(echo .)org \
    --cc=iommu@lists$(echo .)linux.dev \
    --cc=j@jannau$(echo .)net \
    --cc=joro@8bytes$(echo .)org \
    --cc=kevin.tian@intel$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    --cc=marcan@marcan$(echo .)st \
    --cc=npiggin@gmail$(echo .)com \
    --cc=robin.murphy@arm$(echo .)com \
    --cc=sven@svenpeter$(echo .)dev \
    --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