From: Vasant Hegde <vasant.hegde@amd.com>
To: Jason Gunthorpe <jgg@ziepe.ca>
Cc: iommu@lists.linux.dev, joro@8bytes.org,
suravee.suthikulpanit@amd.com, wei.huang2@amd.com,
jsnitsel@redhat.com
Subject: Re: [PATCH RESEND 08/10] iommu/amd: Add support for add/remove device for IOPF
Date: Wed, 30 Aug 2023 20:04:00 +0530 [thread overview]
Message-ID: <af157bc3-e3b8-3969-fb53-b81f4b24d76b@amd.com> (raw)
In-Reply-To: <ZOYmtQiwsodtm/Eu@ziepe.ca>
Jason,
On 8/23/2023 9:03 PM, Jason Gunthorpe wrote:
> On Wed, Aug 23, 2023 at 02:04:13PM +0000, Vasant Hegde wrote:
>
>> diff --git a/drivers/iommu/amd/ppr.c b/drivers/iommu/amd/ppr.c
>> index 8cbcdb9c1669..2e5ca4847eda 100644
>> --- a/drivers/iommu/amd/ppr.c
>> +++ b/drivers/iommu/amd/ppr.c
>> @@ -168,3 +168,53 @@ 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)
>> + goto out;
>> +
>> + ret = iopf_queue_add_device(iommu->iopf_queue, dev);
>> + if (ret)
>> + goto out;
>> +
>> + ret = iommu_register_device_fault_handler(dev, iommu_queue_iopf, dev);
>> + if (ret)
>> + iopf_queue_remove_device(iommu->iopf_queue, dev);
>> +
>> +out:
>> + raw_spin_unlock_irqrestore(&iommu->lock, flags);
>> + return ret;
>> +}
>
> Please assume the iopf rework will arrive before your series:
>
> https://lore.kernel.org/linux-iommu/20230817234047.195194-1-baolu.lu@linux.intel.com/
Sure. I will rebase/rework patches on top of this series.
-Vasant
next prev parent reply other threads:[~2023-08-30 14:34 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-23 14:04 [PATCH RESEND 00/10] iommu/amd: SVA Support (Part 4) - SVA and IOPF Vasant Hegde
2023-08-23 14:04 ` [PATCH RESEND 01/10] iommu/amd: Rename amd_iommu_v2_supported() as amd_iommu_sva_supported() Vasant Hegde
2023-08-23 14:04 ` [PATCH RESEND 02/10] iommu/amd: Add support for enabling/disabling IOMMU features Vasant Hegde
2023-08-23 14:04 ` [PATCH RESEND 03/10] iommu/amd: Initial SVA support for AMD IOMMU Vasant Hegde
2023-08-23 14:28 ` Jason Gunthorpe
2023-08-28 10:39 ` Vasant Hegde
2023-08-30 17:07 ` Jason Gunthorpe
2023-09-05 6:18 ` Vasant Hegde
2023-09-05 12:26 ` Jason Gunthorpe
2023-09-05 14:39 ` Vasant Hegde
2023-09-05 18:14 ` Jason Gunthorpe
2023-09-11 12:16 ` Vasant Hegde
2023-09-11 12:41 ` Jason Gunthorpe
2023-08-23 14:04 ` [PATCH RESEND 04/10] iommu/amd: Add support to enable/disable SVA feature Vasant Hegde
2023-08-23 15:28 ` Jason Gunthorpe
2023-08-28 10:45 ` Vasant Hegde
2023-08-30 17:09 ` Jason Gunthorpe
2023-08-30 19:00 ` Vasant Hegde
2023-08-30 23:46 ` Jason Gunthorpe
2023-09-07 7:15 ` Vasant Hegde
2023-09-07 12:04 ` Jason Gunthorpe
2023-08-23 14:04 ` [PATCH RESEND 05/10] iommu/amd: Move PPR-related functions into ppr.c Vasant Hegde
2023-08-23 14:04 ` [PATCH RESEND 06/10] iommu/amd: Define per-IOMMU iopf_queue Vasant Hegde
2023-08-23 14:04 ` [PATCH RESEND 07/10] iommu/amd: Add support for page response Vasant Hegde
2023-08-23 14:04 ` [PATCH RESEND 08/10] iommu/amd: Add support for add/remove device for IOPF Vasant Hegde
2023-08-23 15:33 ` Jason Gunthorpe
2023-08-30 14:34 ` Vasant Hegde [this message]
2023-08-23 14:04 ` [PATCH RESEND 09/10] iommu/amd: Add IO page fault notifier handler Vasant Hegde
2023-08-23 14:04 ` [PATCH RESEND 10/10] iommu/amd: Introduce logic to enable/disable IOPF Vasant Hegde
2023-08-23 15:36 ` Jason Gunthorpe
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=af157bc3-e3b8-3969-fb53-b81f4b24d76b@amd.com \
--to=vasant.hegde@amd.com \
--cc=iommu@lists.linux.dev \
--cc=jgg@ziepe.ca \
--cc=joro@8bytes.org \
--cc=jsnitsel@redhat.com \
--cc=suravee.suthikulpanit@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox