[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <34f96069-2fe4-4578-85e2-8d506ef1df14@linux.intel.com>
Date: Wed, 26 Feb 2025 11:53:59 +0800
From: Baolu Lu <baolu.lu@...ux.intel.com>
To: "Tian, Kevin" <kevin.tian@...el.com>, Joerg Roedel <joro@...tes.org>,
Will Deacon <will@...nel.org>, Robin Murphy <robin.murphy@....com>,
Jason Gunthorpe <jgg@...pe.ca>
Cc: "Jiang, Dave" <dave.jiang@...el.com>, Vinod Koul <vkoul@...nel.org>,
Fenghua Yu <fenghuay@...dia.com>, Zhangfei Gao <zhangfei.gao@...aro.org>,
Zhou Wang <wangzhou1@...ilicon.com>,
"iommu@...ts.linux.dev" <iommu@...ts.linux.dev>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 05/12] iommu/vt-d: Move PRI enablement in probe path
On 2/25/25 15:37, Tian, Kevin wrote:
>> From: Lu Baolu <baolu.lu@...ux.intel.com>
>> Sent: Monday, February 24, 2025 1:16 PM
>>
>> @@ -3743,6 +3743,16 @@ static struct iommu_device
>> *intel_iommu_probe_device(struct device *dev)
>> else
>> info->ats_enabled = 1;
>> }
>> +
>> + if (info->ats_enabled && info->pri_supported) {
>> + /* PASID is required in PRG Response Message. */
>> + if (info->pasid_enabled
>> || !pci_prg_resp_pasid_required(pdev)) {
>
> this should be:
>
> if (!info->pasid_enabled || pci_prg_resp_pasid_required(pdev))
Yes, fixed.
>
>
>> @@ -3761,6 +3771,13 @@ static void intel_iommu_release_device(struct
>> device *dev)
>> struct device_domain_info *info = dev_iommu_priv_get(dev);
>> struct intel_iommu *iommu = info->iommu;
>>
>> + WARN_ON(info->iopf_refcount);
>
> call iopf_queue_remove_device() in this case?
Yes. I will make it like this,
if (WARN_ON(info->iopf_refcount))
iopf_queue_remove_device(iommu->iopf_queue, dev);
>> +void intel_iommu_disable_iopf(struct device *dev)
>> +{
>> + struct device_domain_info *info = dev_iommu_priv_get(dev);
>> + struct intel_iommu *iommu = info->iommu;
>> +
>> + if (WARN_ON(!info->pri_enabled))
>> + return;
>
> also warn on !info->iopf_refcount
Yes, added.
Thanks,
baolu
Powered by blists - more mailing lists