[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <3963b517-a609-4c53-b373-f0424cb84099@linux.intel.com>
Date: Tue, 4 Mar 2025 16:25:47 +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: baolu.lu@...ux.intel.com, "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 v3 04/12] iommu/vt-d: Move scalable mode ATS enablement to
probe path
On 2025/3/4 16:15, Tian, Kevin wrote:
>> From: Lu Baolu<baolu.lu@...ux.intel.com>
>> Sent: Friday, February 28, 2025 5:26 PM
>>
>> Device ATS is currently enabled when a domain is attached to the device
>> and disabled when the domain is detached. This creates a limitation:
>> when the IOMMU is operating in scalable mode and IOPF is enabled, the
>> device's domain cannot be changed.
> could you extend it with your earlier reply?
>
> https://lore.kernel.org/linux-iommu/6a418974-d06e-46e3-879f-
> ab4c84a95231@...ux.intel.com/
>
>> -static void iommu_enable_pci_caps(struct device_domain_info *info)
>> +static void iommu_enable_pci_ats(struct device_domain_info *info)
>> {
>> struct pci_dev *pdev;
>>
>> - if (!dev_is_pci(info->dev))
>> + if (!info->ats_supported)
>> return;
>>
>> pdev = to_pci_dev(info->dev);
>> - if (info->ats_supported && pci_ats_page_aligned(pdev) &&
>> - !pci_enable_ats(pdev, VTD_PAGE_SHIFT))
>> + if (!pci_ats_page_aligned(pdev))
>> + return;
>> +
>> + if (!pci_enable_ats(pdev, VTD_PAGE_SHIFT))
>> info->ats_enabled = 1;
>> }
>>
> still prefer to some comment above as you explained in above
> reply. It's not obvious w/o knowing the tricky background.
Okay, sure.
Powered by blists - more mailing lists