Linux IOMMU Development
 help / color / mirror / Atom feed
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
To: Jason Gunthorpe <jgg@nvidia.com>,
	iommu@lists.linux.dev, Joerg Roedel <joro@8bytes.org>,
	Robin Murphy <robin.murphy@arm.com>,
	Will Deacon <will@kernel.org>
Cc: Lu Baolu <baolu.lu@linux.intel.com>,
	Heiko Stuebner <heiko@sntech.de>, Joerg Roedel <jroedel@suse.de>,
	Jerry Snitselaar <jsnitsel@redhat.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Nicolin Chen <nicolinc@nvidia.com>,
	Niklas Schnelle <schnelle@linux.ibm.com>,
	Steven Price <steven.price@arm.com>
Subject: Re: [PATCH] iommu: Do not use IOMMU_DOMAIN_DMA if CONFIG_IOMMU_DMA is not enabled
Date: Tue, 3 Oct 2023 20:34:47 +0300	[thread overview]
Message-ID: <08ff4faa-2936-44bb-b1c6-d9fc77f8e170@linaro.org> (raw)
In-Reply-To: <0-v1-20700abdf239+19c-iommu_no_dma_iommu_jgg@nvidia.com>

On 03/10/2023 19:52, Jason Gunthorpe wrote:
> msm_iommu platforms do not select either CONFIG_IOMMU_DMA or
> CONFIG_ARM_DMA_USE_IOMMU so they create a IOMMU_DOMAIN_DMA domain by
> default and never populate it. This acts like a BLOCKED domain and breaks
> the GPU driver on the platform.
> 
> Detect this and force use of IDENTITY instead.
> 
> Fixes: 98ac73f99bc4 ("iommu: Require a default_domain for all iommu drivers")
> Reported-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> Link: https://lore.kernel.org/linux-iommu/CAA8EJprz7VVmBG68U9zLuqPd0UdSRHYoLDJSP6tCj6H6qanuTQ@mail.gmail.com/
> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
> ---
>   drivers/iommu/iommu.c | 12 ++++++++++++
>   1 file changed, 12 insertions(+)
> 
> Dmitry, I changed the patch from what I got you to test, probably best if you
> can confirm this is OK too. This should fix any other drivers beyond msm that are
> doing the same thing. Thanks

It still works for me, so:

Tested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

Thanks a lot for your help!


-- 
With best wishes
Dmitry


  reply	other threads:[~2023-10-03 17:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-03 16:52 [PATCH] iommu: Do not use IOMMU_DOMAIN_DMA if CONFIG_IOMMU_DMA is not enabled Jason Gunthorpe
2023-10-03 17:34 ` Dmitry Baryshkov [this message]
2023-10-03 17:45 ` Jerry Snitselaar
2023-10-05 11:00 ` Joerg Roedel

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=08ff4faa-2936-44bb-b1c6-d9fc77f8e170@linaro.org \
    --to=dmitry.baryshkov@linaro.org \
    --cc=baolu.lu@linux.intel.com \
    --cc=heiko@sntech.de \
    --cc=iommu@lists.linux.dev \
    --cc=jgg@nvidia.com \
    --cc=joro@8bytes.org \
    --cc=jroedel@suse.de \
    --cc=jsnitsel@redhat.com \
    --cc=m.szyprowski@samsung.com \
    --cc=nicolinc@nvidia.com \
    --cc=robin.murphy@arm.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