From: Jason Gunthorpe <jgg@ziepe.ca>
To: Vasant Hegde <vasant.hegde@amd.com>
Cc: iommu@lists.linux.dev, joro@8bytes.org,
suravee.suthikulpanit@amd.com, wei.huang2@amd.com,
jsnitsel@redhat.com
Subject: Re: [PATCH v5 08/14] iommu/amd: Add support for add/remove device for IOPF
Date: Thu, 1 Feb 2024 17:46:22 -0400 [thread overview]
Message-ID: <20240201214622.GS50608@ziepe.ca> (raw)
In-Reply-To: <20240118073339.6978-9-vasant.hegde@amd.com>
On Thu, Jan 18, 2024 at 07:33:33AM +0000, Vasant Hegde wrote:
> From: Wei Huang <wei.huang2@amd.com>
>
> Which adds/removes the device to the corresponding per-IOMMU iopf_queue.
> It also registers device fault handler. These interfaces are called
> from IOPF feature enable/disable path.
"fault handler"? Not anymore right?
They should not be called from the iopf feature path :(
> diff --git a/drivers/iommu/amd/ppr.c b/drivers/iommu/amd/ppr.c
> index b1751eb495fd..6b1fdda95514 100644
> --- a/drivers/iommu/amd/ppr.c
> +++ b/drivers/iommu/amd/ppr.c
> @@ -163,3 +163,38 @@ int amd_iommu_page_response(struct device *dev,
> return amd_iommu_complete_ppr(pdev, resp->pasid, resp->code,
> resp->grpid);
> }
> +
> +int amd_iommu_iopf_add_device(struct amd_iommu *iommu, struct device *dev)
> +{
> + unsigned long flags;
> + int ret = -EINVAL;
> +
> + raw_spin_lock_irqsave(&iommu->lock, flags);
> +
> + if (!iommu->iopf_queue) {
> + raw_spin_unlock_irqrestore(&iommu->lock, flags);
> + return ret;
goto out_unlock if you are going to write it like that
Jason
next prev parent reply other threads:[~2024-02-01 21:46 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-18 7:33 [PATCH v5 00/14] iommu/amd: SVA Support (Part 4) - SVA and IOPF Vasant Hegde
2024-01-18 7:33 ` [PATCH v5 01/14] iommu/amd: Rename amd_iommu_v2_supported() as amd_iommu_pasid_supported() Vasant Hegde
2024-01-18 7:33 ` [PATCH v5 02/14] iommu/amd: Introduce per device DTE update function Vasant Hegde
2024-02-02 15:29 ` Jason Gunthorpe
2024-01-18 7:33 ` [PATCH v5 03/14] iommu/amd: Add support for enabling/disabling IOMMU features Vasant Hegde
2024-01-18 7:33 ` [PATCH v5 04/14] iommu/amd: Move PPR-related functions into ppr.c Vasant Hegde
2024-02-02 15:29 ` Jason Gunthorpe
2024-01-18 7:33 ` [PATCH v5 05/14] iommu/amd: Fix PPR interrupt processing logic Vasant Hegde
2024-02-02 15:30 ` Jason Gunthorpe
2024-01-18 7:33 ` [PATCH v5 06/14] iommu/amd: Define per-IOMMU iopf_queue Vasant Hegde
2024-02-02 15:30 ` Jason Gunthorpe
2024-01-18 7:33 ` [PATCH v5 07/14] iommu/amd: Add support for page response Vasant Hegde
2024-02-01 20:20 ` Jason Gunthorpe
2024-02-06 15:39 ` Vasant Hegde
2024-01-18 7:33 ` [PATCH v5 08/14] iommu/amd: Add support for add/remove device for IOPF Vasant Hegde
2024-02-01 21:46 ` Jason Gunthorpe [this message]
2024-02-06 16:02 ` Vasant Hegde
2024-01-18 7:33 ` [PATCH v5 09/14] iommu/amd: Add IO page fault notifier handler Vasant Hegde
2024-01-18 7:33 ` [PATCH v5 10/14] iommu/amd: Introduce logic to enable/disable IOPF Vasant Hegde
2024-02-01 21:49 ` Jason Gunthorpe
2024-02-06 16:19 ` Vasant Hegde
2024-02-06 16:36 ` Jason Gunthorpe
2024-02-06 17:29 ` Vasant Hegde
2024-02-06 17:58 ` Jason Gunthorpe
2024-02-07 8:58 ` Vasant Hegde
2024-02-07 12:36 ` Baolu Lu
2024-02-07 18:00 ` Vasant Hegde
2024-02-08 17:31 ` Jason Gunthorpe
2024-02-08 18:37 ` Vasant Hegde
2024-02-08 19:03 ` Jason Gunthorpe
2024-01-18 7:33 ` [PATCH v5 11/14] iommu/amd: Add GCR3 [un]initialization function Vasant Hegde
2024-02-02 15:17 ` Jason Gunthorpe
2024-02-06 17:00 ` Vasant Hegde
2024-01-18 7:33 ` [PATCH v5 12/14] iommu/amd: Initial SVA support for AMD IOMMU Vasant Hegde
2024-02-02 15:25 ` Jason Gunthorpe
2024-02-06 17:16 ` Vasant Hegde
2024-02-06 17:34 ` Jason Gunthorpe
2024-02-07 9:31 ` Vasant Hegde
2024-02-08 17:41 ` Jason Gunthorpe
2024-02-08 18:23 ` Vasant Hegde
2024-02-08 18:48 ` Jason Gunthorpe
2024-01-18 7:33 ` [PATCH v5 13/14] iommu: Add ops->domain_alloc_sva() Vasant Hegde
2024-01-18 7:33 ` [PATCH v5 14/14] iommu/amd: Add SVA domain support Vasant Hegde
2024-02-02 15:28 ` Jason Gunthorpe
2024-01-18 7:40 ` [PATCH v5 00/14] iommu/amd: SVA Support (Part 4) - SVA and IOPF Vasant Hegde
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=20240201214622.GS50608@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=jsnitsel@redhat.com \
--cc=suravee.suthikulpanit@amd.com \
--cc=vasant.hegde@amd.com \
--cc=wei.huang2@amd.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.