[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a4d650cf-c8e4-4590-ab6f-f464a17125d1@linux.intel.com>
Date: Wed, 26 Feb 2025 12:06:18 +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 08/12] iommufd/selftest: Put iopf enablement in domain
attach path
On 2/25/25 16:16, Tian, Kevin wrote:
>> + ret = mock_dev_enable_iopf(dev, domain);
>> + if (ret)
>> + return ret;
>> +
>> + mock_dev_disable_iopf(dev, mdev->domain);
> You could use the same trick to simplify iopf_for_domain_replace()
> in patch7?
Yes, simplify it like this,
static inline int iopf_for_domain_replace(struct iommu_domain *new,
struct iommu_domain *old,
struct device *dev)
{
int ret;
ret = iopf_for_domain_set(new, dev);
if (ret)
return ret;
iopf_for_domain_remove(old, dev);
return 0;
}
Thanks,
baolu
Powered by blists - more mailing lists