[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BN9PR11MB5276852398C05D067FEFB2DF8CC32@BN9PR11MB5276.namprd11.prod.outlook.com>
Date: Tue, 25 Feb 2025 08:16:31 +0000
From: "Tian, Kevin" <kevin.tian@...el.com>
To: Lu Baolu <baolu.lu@...ux.intel.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
> From: Lu Baolu <baolu.lu@...ux.intel.com>
> Sent: Monday, February 24, 2025 1:16 PM
>
> Update iopf enablement in the iommufd mock device driver to use the new
> method, similar to the arm-smmu-v3 driver. Enable iopf support when any
> domain with an iopf_handler is attached, and disable it when the domain
> is removed.
>
> Add a refcount in the mock device state structure to keep track of the
> number of domains set to the device and PASIDs that require iopf.
>
> Signed-off-by: Lu Baolu <baolu.lu@...ux.intel.com>
Reviewed-by: Kevin Tian <kevin.tian@...el.com>
with a nit:
>
> + 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?
Powered by blists - more mailing lists