Re: [PATCH RFC PREVIEW 6/6] iommu/vt-d: do not require a PASID in page requests
From: Joel Granados
Date: Wed Sep 04 2024 - 06:19:51 EST
On Mon, Aug 26, 2024 at 01:40:32PM +0200, Klaus Jensen wrote:
> From: Klaus Jensen <k.jensen@xxxxxxxxxxx>
>
> PRQ events can now be handled without a PASID being present. Remove the
> restriction.
>
> Signed-off-by: Klaus Jensen <k.jensen@xxxxxxxxxxx>
> ---
> drivers/iommu/intel/prq.c | 12 +++---------
> 1 file changed, 3 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/iommu/intel/prq.c b/drivers/iommu/intel/prq.c
> index 2814373e95d8..cc36198ebf91 100644
> --- a/drivers/iommu/intel/prq.c
> +++ b/drivers/iommu/intel/prq.c
> @@ -101,18 +101,12 @@ static irqreturn_t prq_event_thread(int irq, void *d)
> req = &iommu->prq[head / sizeof(*req)];
> address = (u64)req->addr << VTD_PAGE_SHIFT;
>
> - if (unlikely(!req->pasid_present)) {
> - pr_err("IOMMU: %s: Page request without PASID\n",
> - iommu->name);
> -bad_req:
> - handle_bad_prq_event(iommu, req, QI_RESP_INVALID);
> - goto prq_advance;
> - }
> -
> if (unlikely(!is_canonical_address(address))) {
> pr_err("IOMMU: %s: Address is not canonical\n",
> iommu->name);
> - goto bad_req;
> +bad_req:
> + handle_bad_prq_event(iommu, req, QI_RESP_INVALID);
> + goto prq_advance;
> }
>
> if (unlikely(req->pm_req && (req->rd_req | req->wr_req))) {
>
> --
> 2.45.2
>
I'll squash this commit with the one that introduces the prq.c file.
Best
--
Joel Granados