From: Baolu Lu <baolu.lu@linux.intel.com>
To: "Tian, Kevin" <kevin.tian@intel.com>,
Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>,
Robin Murphy <robin.murphy@arm.com>,
Jason Gunthorpe <jgg@ziepe.ca>,
"Badger, Eric" <ebadger@purestorage.com>
Cc: baolu.lu@linux.intel.com,
"iommu@lists.linux.dev" <iommu@lists.linux.dev>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Jason Gunthorpe <jgg@nvidia.com>
Subject: Re: [PATCH 1/2] iommu: Add static iommu_ops->release_domain
Date: Wed, 28 Feb 2024 11:30:02 +0800 [thread overview]
Message-ID: <599a72b7-3343-4862-93fe-c6985d20a784@linux.intel.com> (raw)
In-Reply-To: <BN9PR11MB52766698FA25EA5D397188878C582@BN9PR11MB5276.namprd11.prod.outlook.com>
On 2/28/24 11:08 AM, Tian, Kevin wrote:
>> From: Baolu Lu <baolu.lu@linux.intel.com>
>> Sent: Wednesday, February 28, 2024 9:14 AM
>>
>> On 2/27/24 3:32 PM, Tian, Kevin wrote:
>>>> From: Lu Baolu<baolu.lu@linux.intel.com>
>>>> Sent: Friday, February 23, 2024 1:13 PM
>>>>
>>>>
>>>> + /*
>>>> + * If the iommu driver provides release_domain then the core code
>>>> + * ensures that domain is attached prior to calling release_device.
>>>> + * Drivers can use this to enforce a translation on the idle iommu.
>>> 'enforce a translation' is confusing in the context of blocking/identity
>>> domain.
>>
>> Blocking or identity domain is also kind of a translation from the
>> core's perspective. The core does not care what type of translation the
>> release_domain is; it just enforces this type of translation before
>> device release if the driver has specified one.
>>
>
> OK.
>
> btw you may also want to update the following comment together:
>
> /*
> * release_device() must stop using any attached domain on the device.
> * If there are still other devices in the group they are not effected
> * by this callback.
> *
> * The IOMMU driver must set the device to either an identity or
> * blocking translation and stop using any domain pointer, as it is
> * going to be freed.
> */
>
> all the purpose is to set the device to identity or blocking, either via attaching
> to an explicit release_domain or implicitly by release_device().
Done.
Best regards,
baolu
next prev parent reply other threads:[~2024-02-28 3:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-23 5:13 [PATCH 0/2] iommu: Fix domain check on device release Lu Baolu
2024-02-23 5:13 ` [PATCH 1/2] iommu: Add static iommu_ops->release_domain Lu Baolu
2024-02-27 7:32 ` Tian, Kevin
2024-02-28 1:13 ` Baolu Lu
2024-02-28 3:08 ` Tian, Kevin
2024-02-28 3:30 ` Baolu Lu [this message]
2024-02-23 5:13 ` [PATCH 2/2] iommu/vt-d: Fix NULL domain on device release Lu Baolu
2024-02-27 7:40 ` Tian, Kevin
2024-02-28 1:22 ` Baolu Lu
2024-02-28 3:08 ` Tian, Kevin
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=599a72b7-3343-4862-93fe-c6985d20a784@linux.intel.com \
--to=baolu.lu@linux.intel.com \
--cc=ebadger@purestorage.com \
--cc=iommu@lists.linux.dev \
--cc=jgg@nvidia.com \
--cc=jgg@ziepe.ca \
--cc=joro@8bytes.org \
--cc=kevin.tian@intel.com \
--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
Powered by JetHome