Linux IOMMU Development
 help / color / mirror / Atom feed
From: Baolu Lu <baolu.lu@linux.intel.com>
To: Jason Gunthorpe <jgg@nvidia.com>, Robin Murphy <robin.murphy@arm.com>
Cc: "Tian, Kevin" <kevin.tian@intel.com>,
	"Rodel, Jorg" <jroedel@suse.de>,
	Qian Cai <quic_qiancai@quicinc.com>,
	"iommu@lists.linux-foundation.org"
	<iommu@lists.linux-foundation.org>, Will Deacon <will@kernel.org>
Subject: Re: [PATCH v2] iommu: iommu_group_claim_dma_owner() must always assign a domain
Date: Fri, 6 May 2022 17:41:50 +0800	[thread overview]
Message-ID: <2e312943-61de-d4f3-d85d-c1b9e1a62e69@linux.intel.com> (raw)
In-Reply-To: <20220505192720.GW49344@nvidia.com>

On 2022/5/6 03:27, Jason Gunthorpe wrote:
> On Thu, May 05, 2022 at 07:56:59PM +0100, Robin Murphy wrote:
> 
>> Ack to that, there are certainly further improvements to consider once we've
>> got known-working code into a released kernel, but let's not get ahead of
>> ourselves just now.
> Yes please
>   
>> (I'm pretty sure we could get away with a single blocking domain per IOMMU
>> instance, rather than per group, but I deliberately saved that one for later
>> - right now one per group to match default domains is simpler to reason
>> about and less churny in the context of the current ownership patches)
> I noticed this too..
> 
> But I thought the driver can do a better job of this. There is no
> reason it has to allocate memory to return a IOMMU_DOMAIN_BLOCKED
> domain - this struct could be a globally allocated singleton for the
> entire driver and that would be even better memory savings.
> 
> For instance, here is a sketch for the Intel driver based on Baolu's
> remark that intel_iommu_detach_device() establishes a blocking
> behavior already on detach_dev (Baolu if you like it can you make a
> proper patch?):

Yes, I will.

The same scheme could also be applied to identity/sva/block domains.
Perhaps make it after v5.19.

Best regards,
baolu
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

  parent reply	other threads:[~2022-05-06  9:42 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-04 19:08 [PATCH v2] iommu: iommu_group_claim_dma_owner() must always assign a domain Jason Gunthorpe via iommu
2022-05-05 10:56 ` Tian, Kevin
2022-05-05 15:33   ` Jason Gunthorpe via iommu
2022-05-05 18:56     ` Robin Murphy
2022-05-05 19:27       ` Jason Gunthorpe via iommu
2022-05-05 20:07         ` Robin Murphy
2022-05-06  9:41         ` Baolu Lu [this message]
2022-05-05 23:28     ` Tian, Kevin
2022-05-06  9:32       ` Robin Murphy
2022-05-06 13:10         ` Jason Gunthorpe via iommu
2022-05-06 13:35           ` Robin Murphy
2022-05-06 13:54             ` Jason Gunthorpe via iommu
2022-05-09  9:59               ` Robin Murphy
2022-05-09 17:26                 ` Jason Gunthorpe via iommu
2022-05-09 22:06                   ` Robin Murphy
2022-05-09 23:35                     ` Jason Gunthorpe via iommu

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=2e312943-61de-d4f3-d85d-c1b9e1a62e69@linux.intel.com \
    --to=baolu.lu@linux.intel.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=jgg@nvidia.com \
    --cc=jroedel@suse.de \
    --cc=kevin.tian@intel.com \
    --cc=quic_qiancai@quicinc.com \
    --cc=robin.murphy@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