From: Baolu Lu <baolu.lu@linux.intel.com>
To: Jason Gunthorpe <jgg@ziepe.ca>
Cc: baolu.lu@linux.intel.com, Eric Badger <ebadger@purestorage.com>,
David Woodhouse <dwmw2@infradead.org>,
Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>,
Robin Murphy <robin.murphy@arm.com>,
"open list:INTEL IOMMU (VT-d)" <iommu@lists.linux.dev>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] iommu/vt-d: Check for non-NULL domain on device release
Date: Thu, 22 Feb 2024 19:53:51 +0800 [thread overview]
Message-ID: <4c64bfb2-26b1-4fed-af30-5acd4ac2759e@linux.intel.com> (raw)
In-Reply-To: <20240221154012.GC13491@ziepe.ca>
On 2024/2/21 23:40, Jason Gunthorpe wrote:
> On Wed, Jan 31, 2024 at 03:10:53PM +0800, Baolu Lu wrote:
>> I like this suggestion.
>>
>> Currently, the device_release callback for an iommu driver does the
>> following:
>>
>> a) Silent IOMMU DMA translation. This is done by detaching the existing
>> domain from the IOMMU and bringing the IOMMU into a blocking state
>> (some drivers might be in identity state);
>> b) Releases the resources allocated in the probe callback and restores
>> the device to its previous state before the probe.
>>
>> From my understanding of your suggestion, we should move a) out of the
>> release callback and make it a special domain, which could be a blocking
>> domain or identity domain, depending on the iommu hardware.
>>
>> In the end, the release_device callback of an iommu driver should focus
>> on the opposite operation of device_probe. This makes the concept
>> clearer.
> Right
>
> Can someone make some patches to fix Eric's bug? We don't really need
> to do the release_domain stuff if the driver just self-attaches one of
> its known static domain types (blocking/identity)
I will follow up with a formal patch series.
Best regards,
baolu
prev parent reply other threads:[~2024-02-22 11:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-13 18:17 [PATCH] iommu/vt-d: Check for non-NULL domain on device release Eric Badger
2024-01-16 15:22 ` Jason Gunthorpe
2024-01-16 23:15 ` Eric Badger
2024-01-17 1:57 ` Robin Murphy
2024-01-17 2:20 ` Jason Gunthorpe
2024-01-31 7:10 ` Baolu Lu
2024-02-21 15:40 ` Jason Gunthorpe
2024-02-22 11:53 ` Baolu Lu [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=4c64bfb2-26b1-4fed-af30-5acd4ac2759e@linux.intel.com \
--to=baolu.lu@linux.intel.com \
--cc=dwmw2@infradead.org \
--cc=ebadger@purestorage.com \
--cc=iommu@lists.linux.dev \
--cc=jgg@ziepe.ca \
--cc=joro@8bytes.org \
--cc=linux-kernel@vger.kernel.org \
--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