Archive-only list for patches
 help / color / mirror / Atom feed
From: Joerg Roedel <jroedel@suse.de>
To: Jason Gunthorpe <jgg@nvidia.com>
Cc: iommu@lists.linux.dev, Joerg Roedel <joro@8bytes.org>,
	Robin Murphy <robin.murphy@arm.com>,
	Will Deacon <will@kernel.org>,
	Lu Baolu <baolu.lu@linux.intel.com>,
	Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
	Heiko Stuebner <heiko@sntech.de>,
	Jerry Snitselaar <jsnitsel@redhat.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Nicolin Chen <nicolinc@nvidia.com>,
	Ovidiu Panait <ovidiu.panait@windriver.com>,
	patches@lists.linux.dev, Shivaprasad G Bhat <sbhat@linux.ibm.com>,
	Niklas Schnelle <schnelle@linux.ibm.com>,
	Steven Price <steven.price@arm.com>
Subject: Re: [PATCH rc] iommu: Allow ops->default_domain to work when !CONFIG_IOMMU_DMA
Date: Thu, 1 Feb 2024 13:20:12 +0100	[thread overview]
Message-ID: <ZbuMfDOuZwTQsm4r@suse.de> (raw)
In-Reply-To: <0-v1-755bd21c4a64+525b8-iommu_def_dom_fix_jgg@nvidia.com>

On Tue, Jan 30, 2024 at 12:12:53PM -0400, Jason Gunthorpe wrote:
> The ops->default_domain flow used a 0 req_type to select the default
> domain and this was enforced by iommu_group_alloc_default_domain().
> 
> When !CONFIG_IOMMU_DMA started forcing the old ARM32 drivers into IDENTITY
> it also overroad the 0 req_type of the ops->default_domain drivers to
> IDENTITY which ends up causing failures during device probe.
> 
> Make iommu_group_alloc_default_domain() accept a req_type that matches the
> ops->default_domain and have iommu_group_alloc_default_domain() generate a
> req_type that matches the default_domain.
> 
> This way the req_type always describes what kind of domain should be
> attached and ops->default_domain overrides all other mechanisms to choose
> the default domain.
> 
> Fixes: 2ad56efa80db ("powerpc/iommu: Setup a default domain and remove set_platform_dma_ops")
> Fixes: 0f6a90436a57 ("iommu: Do not use IOMMU_DOMAIN_DMA if CONFIG_IOMMU_DMA is not enabled")
> Reported-by: Ovidiu Panait <ovidiu.panait@windriver.com>
> Closes: https://lore.kernel.org/linux-iommu/20240123165829.630276-1-ovidiu.panait@windriver.com/
> Reported-by: Shivaprasad G Bhat <sbhat@linux.ibm.com>
> Closes: https://lore.kernel.org/linux-iommu/170618452753.3805.4425669653666211728.stgit@ltcd48-lp2.aus.stglab.ibm.com/
> Tested-by: Ovidiu Panait <ovidiu.panait@windriver.com>
> Tested-by: Shivaprasad G Bhat <sbhat@linux.ibm.com>
> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
> ---
>  drivers/iommu/iommu.c | 18 +++++++++++++-----
>  1 file changed, 13 insertions(+), 5 deletions(-)

Applied, thanks.

-- 
Jörg Rödel
jroedel@suse.de

SUSE Software Solutions Germany GmbH
Frankenstraße 146
90461 Nürnberg
Germany
https://www.suse.com/

Geschäftsführer: Ivo Totev, Andrew McDonald, Werner Knoblich
(HRB 36809, AG Nürnberg)

      reply	other threads:[~2024-02-01 12:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-30 16:12 [PATCH rc] iommu: Allow ops->default_domain to work when !CONFIG_IOMMU_DMA Jason Gunthorpe
2024-02-01 12:20 ` Joerg Roedel [this message]

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=ZbuMfDOuZwTQsm4r@suse.de \
    --to=jroedel@suse.de \
    --cc=baolu.lu@linux.intel.com \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=heiko@sntech.de \
    --cc=iommu@lists.linux.dev \
    --cc=jgg@nvidia.com \
    --cc=joro@8bytes.org \
    --cc=jsnitsel@redhat.com \
    --cc=m.szyprowski@samsung.com \
    --cc=nicolinc@nvidia.com \
    --cc=ovidiu.panait@windriver.com \
    --cc=patches@lists.linux.dev \
    --cc=robin.murphy@arm.com \
    --cc=sbhat@linux.ibm.com \
    --cc=schnelle@linux.ibm.com \
    --cc=steven.price@arm.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