public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nicolin Chen <nicolinc@nvidia.com>
To: Lu Baolu <baolu.lu@linux.intel.com>
Cc: Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>,
	"Robin Murphy" <robin.murphy@arm.com>,
	Jason Gunthorpe <jgg@ziepe.ca>, Kevin Tian <kevin.tian@intel.com>,
	Dave Jiang <dave.jiang@intel.com>, Vinod Koul <vkoul@kernel.org>,
	Fenghua Yu <fenghuay@nvidia.com>,
	Zhangfei Gao <zhangfei.gao@linaro.org>,
	Zhou Wang <wangzhou1@hisilicon.com>, <iommu@lists.linux.dev>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v4 4/8] iommufd/selftest: Put iopf enablement in domain attach path
Date: Tue, 18 Mar 2025 12:50:30 -0700	[thread overview]
Message-ID: <Z9nOhn09L0prvkUi@Asurada-Nvidia> (raw)
In-Reply-To: <20250313051953.4064532-5-baolu.lu@linux.intel.com>

On Thu, Mar 13, 2025 at 01:19:49PM +0800, Lu Baolu wrote:
> @@ -164,6 +167,8 @@ struct mock_dev {
>  	unsigned long flags;
>  	int id;
>  	u32 cache[MOCK_DEV_CACHE_NUM];
> +	unsigned int iopf_refcount;
> +	struct iommu_domain *domain;

Assuming both are protected by the core group->mutex, maybe add
lockdep_assert_held() in mock_dev_enable/disable_iopf()?

> +static int mock_domain_blocking_attach(struct iommu_domain *domain,
> +				       struct device *dev)
> +{
> +	struct mock_dev *mdev = to_mock_dev(dev);
> +
> +	mock_dev_disable_iopf(dev, mdev->domain);
> +	mdev->domain = NULL;

The input domain is valid. Maybe better to rename mdev->domain
to mdev->iopf_domain?

With that,

Reviewed-by: Nicolin Chen <nicolinc@nvidia.com>

  parent reply	other threads:[~2025-03-18 19:50 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-13  5:19 [PATCH v4 0/8] iommu: Remove IOMMU_DEV_FEAT_SVA/_IOPF Lu Baolu
2025-03-13  5:19 ` [PATCH v4 1/8] iommu/arm-smmu-v3: Put iopf enablement in the domain attach path Lu Baolu
2025-03-13  5:19 ` [PATCH v4 2/8] iommu: Remove IOMMU_DEV_FEAT_SVA Lu Baolu
2025-03-13  5:19 ` [PATCH v4 3/8] iommu/vt-d: Put iopf enablement in domain attach path Lu Baolu
2025-03-18  9:58   ` Yi Liu
2025-03-18 13:19     ` Baolu Lu
2025-03-13  5:19 ` [PATCH v4 4/8] iommufd/selftest: " Lu Baolu
2025-03-18 10:25   ` Yi Liu
2025-03-18 19:50   ` Nicolin Chen [this message]
2025-03-13  5:19 ` [PATCH v4 5/8] dmaengine: idxd: Remove unnecessary IOMMU_DEV_FEAT_IOPF Lu Baolu
2025-03-18 10:20   ` Yi Liu
2025-03-13  5:19 ` [PATCH v4 6/8] uacce: " Lu Baolu
2025-03-13  5:19 ` [PATCH v4 7/8] iommufd: " Lu Baolu
2025-03-13  5:19 ` [PATCH v4 8/8] iommu: Remove iommu_dev_enable/disable_feature() Lu Baolu
2025-03-13  9:51 ` [PATCH v4 0/8] iommu: Remove IOMMU_DEV_FEAT_SVA/_IOPF Zhangfei Gao
2025-03-13 10:57   ` Zhangfei Gao
2025-03-13 11:20     ` Baolu Lu
2025-03-13 11:37       ` Zhangfei Gao
2025-03-14  4:04         ` Zhangfei Gao
2025-03-14  8:11 ` Zhangfei Gao
2025-03-17 14:15   ` Jason Gunthorpe
2025-04-16  7:29 ` Zhangfei Gao
2025-04-16  7:33   ` Baolu Lu

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=Z9nOhn09L0prvkUi@Asurada-Nvidia \
    --to=nicolinc@nvidia.com \
    --cc=baolu.lu@linux.intel.com \
    --cc=dave.jiang@intel.com \
    --cc=fenghuay@nvidia.com \
    --cc=iommu@lists.linux.dev \
    --cc=jgg@ziepe.ca \
    --cc=joro@8bytes.org \
    --cc=kevin.tian@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=vkoul@kernel.org \
    --cc=wangzhou1@hisilicon.com \
    --cc=will@kernel.org \
    --cc=zhangfei.gao@linaro.org \
    /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