public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Baolu Lu <baolu.lu@linux.intel.com>
To: Joel Granados <j.granados@samsung.com>
Cc: baolu.lu@linux.intel.com, David Woodhouse <dwmw2@infradead.org>,
	Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>,
	Robin Murphy <robin.murphy@arm.com>,
	Jason Gunthorpe <jgg@ziepe.ca>, Kevin Tian <kevin.tian@intel.com>,
	Klaus Jensen <its@irrelevant.dk>,
	linux-kernel@vger.kernel.org, iommu@lists.linux.dev
Subject: Re: [PATCH 5/6] iommu: init pasid array while doing domain_replace and iopf is active
Date: Thu, 12 Sep 2024 12:17:35 +0800	[thread overview]
Message-ID: <f4ea2a66-49ac-41ae-94c4-2832f08303f1@linux.intel.com> (raw)
In-Reply-To: <20240911095544.4ad3u6jxgsdsymhj@joelS2.panther.com>

On 9/11/24 5:55 PM, Joel Granados wrote:
> On Thu, Sep 05, 2024 at 11:30:05AM +0800, Baolu Lu wrote:
>> On 9/4/24 9:17 PM, Joel Granados via B4 Relay wrote:
>>> From: Joel Granados<j.granados@samsung.com>
>>>
>>> iommu_report_device_fault expects a pasid array to have an
>>> iommu_attach_handle when a fault is detected.
>> The iommu_attach_handle is expected only when an iopf-capable domain is
>> attached to the device or PASID. The iommu_report_device_fault() treats
>> it as a fault when a fault occurs, but no iopf-capable domain is
>> attached.
> I don't follow. The way that I read it: if the pasid_array x-array does
> not have an iommu_attach_handle indexed by either fault->prm.pasid or
> IOMMU_NO_PASID, it will follow the err_bad_iopf and return -EINVAL
> (please correct me if I'm wrong). So the iommu_attach_handle is*always*
> expected.
> 
> Would it be more clear for it to be:
> """
> The iommu_report_device_fault function expects the pasid_array x-array
> to have an iommu_attach_handle indexed by a PASID. Add one indexed with
> IOMMU_NO_PASID when the replacing HWPT has a valid iommufd fault object.
> Remove it when we release ownership of the group.

Can you please explain why iommu core needs to remove the attach handle
when the ownership of the group is changed?

Thanks,
baolu

  reply	other threads:[~2024-09-12  4:21 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-04 13:17 [PATCH 0/6] iommu: Enable user space IOPFs in non-nested and non-svm cases Joel Granados via B4 Relay
2024-09-04 13:17 ` [PATCH 1/6] iommu/vt-d: Separate page request queue from SVM Joel Granados via B4 Relay
2024-09-05  3:18   ` Baolu Lu
2024-09-11  7:28     ` Joel Granados
2024-09-04 13:17 ` [PATCH 2/6] iommu/vt-d: Remove the pasid present check in prq_event_thread Joel Granados via B4 Relay
2024-09-04 13:17 ` [PATCH 3/6] iommu: kconfig: Move IOMMU_IOPF into INTEL_IOMMU Joel Granados via B4 Relay
2024-09-07 12:20   ` Jason Gunthorpe
2024-09-11  7:40     ` Joel Granados
2024-09-15 13:37       ` Jason Gunthorpe
2024-09-16 12:24         ` Joel Granados
2024-09-04 13:17 ` [PATCH 4/6] iommufd: Enable PRI when doing the iommufd_hwpt_alloc Joel Granados via B4 Relay
2024-09-04 13:17 ` [PATCH 5/6] iommu: init pasid array while doing domain_replace and iopf is active Joel Granados via B4 Relay
2024-09-05  3:30   ` Baolu Lu
2024-09-05  3:32     ` Baolu Lu
2024-09-11  9:55     ` Joel Granados
2024-09-12  4:17       ` Baolu Lu [this message]
2024-09-12 10:22         ` Joel Granados
2024-09-11 10:56     ` Joel Granados
2024-09-12  4:21       ` Baolu Lu
2024-09-12  8:25         ` Joel Granados
2024-09-12 11:22           ` Baolu Lu
2024-09-13  8:02             ` Joel Granados
2024-09-12 10:00         ` Joel Granados
2024-09-04 13:17 ` [PATCH 6/6] iommu/vt-d: drop pasid requirement for prq initialization Joel Granados via B4 Relay

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=f4ea2a66-49ac-41ae-94c4-2832f08303f1@linux.intel.com \
    --to=baolu.lu@linux.intel.com \
    --cc=dwmw2@infradead.org \
    --cc=iommu@lists.linux.dev \
    --cc=its@irrelevant.dk \
    --cc=j.granados@samsung.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