mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Baolu Lu <baolu.lu@linux.intel.com>
To: Ethan Zhao <haifeng.zhao@linux.intel.com>, iommu@lists.linux.dev
Cc: baolu.lu@linux.intel.com, Joerg Roedel <joro@8bytes.org>,
	Will Deacon <will@kernel.org>,
	Robin Murphy <robin.murphy@arm.com>,
	Kevin Tian <kevin.tian@intel.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] iommu/vt-d: Enable PASID during iommu device probe
Date: Thu, 15 Sep 2022 11:00:21 +0800	[thread overview]
Message-ID: <5415d383-5442-a127-bdab-fce9e9b7a3b2@linux.intel.com> (raw)
In-Reply-To: <e26efaee-d84a-3b60-8400-90d8e49a9b25@linux.intel.com>



On 9/14/22 4:59 PM, Ethan Zhao wrote:
>>> What the error path would be if this code runs on some old platforms 
>>> don't
>>>
>>> support PASID, would you print out "this platform doesn't suppor 
>>> PASID" and
>>>
>>> give users an interface function to query if the PASID cap of iommu 
>>> is enabled
>>>
>>> and if not why ?
>>
>> It's not an error case if the IOMMU doesn't support PASID. But it's an
>> error case if any device drivers call PASID related IOMMU interfaces
>> (for example, iommu_domain_attach/detach_dev_pasid()). The corresponding
>> error code will be returned to the drivers.
>>
> So iommu driver withdraws the flexibility/rights from device driver 
> about the
> 
> ability to enable PASID, looks much more *integrated* iommu works as 
> relation

No. This patch doesn't withdraw anything. It's just a code refactoring.

> 
> controller in device-iommu-domain by enabling PASID in iommu probe stage
> 
> by default -- iommu decides to enable PASID or not though device-iommu-
> 
> domain might not work ? or they should work because they are hard-wired
> 
> together (device - iommu) even device is hotpluged later.
> 

I may not get you exactly. :-) Some IOMMU features reply on PASID
capabilities on both IOMMU and device. The IOMMU drivers enumerate the
capabilities and enable them if they are supported.

Best regards,
baolu

  parent reply	other threads:[~2022-09-15  3:06 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-12  2:48 Lu Baolu
2022-09-13  3:13 ` Tian, Kevin
2022-09-13  6:01   ` Baolu Lu
2022-09-13  7:42     ` Tian, Kevin
2022-09-13  7:46 ` Ethan Zhao
2022-09-13  9:30   ` Baolu Lu
     [not found]     ` <e26efaee-d84a-3b60-8400-90d8e49a9b25@linux.intel.com>
2022-09-15  3:00       ` Baolu Lu [this message]
2022-09-16  2:40         ` Ethan Zhao
2022-09-16  3:05           ` Baolu Lu
2022-09-16  3:37             ` Ethan Zhao
     [not found]             ` <a6ac5953-7372-9894-58d4-d1ee2905d4dd@linux.intel.com>
2022-09-16  4:01               ` Baolu Lu
2022-09-13  8:01 ` Tian, Kevin
2022-09-13  9:25   ` Baolu Lu
2022-09-15  3:22     ` Tian, Kevin
2022-09-15  7:21       ` Baolu Lu

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=5415d383-5442-a127-bdab-fce9e9b7a3b2@linux.intel.com \
    --to=baolu.lu@linux.intel.com \
    --cc=haifeng.zhao@linux.intel.com \
    --cc=iommu@lists.linux.dev \
    --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

all inboxes | Powered by JetHome®