Archive-only list for patches
 help / color / mirror / Atom feed
From: Nicolin Chen <nicolinc@nvidia.com>
To: Jason Gunthorpe <jgg@nvidia.com>
Cc: <iommu@lists.linux.dev>, Kevin Tian <kevin.tian@intel.com>,
	<patches@lists.linux.dev>, Yi Liu <yi.l.liu@intel.com>
Subject: Re: [PATCH] iommufd: Require drivers to supply the cache_invalidate_user ops
Date: Fri, 28 Jun 2024 14:27:00 -0700	[thread overview]
Message-ID: <Zn8qpB6Xigupm+Ge@Asurada-Nvidia> (raw)
In-Reply-To: <0-v1-e153859bd707+61-iommufd_check_ops_jgg@nvidia.com>

On Fri, Jun 28, 2024 at 01:11:11PM -0300, Jason Gunthorpe wrote:

> All existing drivers implement this op for nesting, this is mostly a
> bisection aid.
> 
> Fixes: 8c6eabae3807 ("iommufd: Add IOMMU_HWPT_INVALIDATE")
> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
> ---
>  drivers/iommu/iommufd/hw_pagetable.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/iommu/iommufd/hw_pagetable.c b/drivers/iommu/iommufd/hw_pagetable.c
> index 33d142f8057d70..a9f1fe44c4c0bd 100644
> --- a/drivers/iommu/iommufd/hw_pagetable.c
> +++ b/drivers/iommu/iommufd/hw_pagetable.c
> @@ -236,7 +236,8 @@ iommufd_hwpt_nested_alloc(struct iommufd_ctx *ictx,
>  	}
>  	hwpt->domain->owner = ops;
>  
> -	if (WARN_ON_ONCE(hwpt->domain->type != IOMMU_DOMAIN_NESTED)) {
> +	if (WARN_ON_ONCE(hwpt->domain->type != IOMMU_DOMAIN_NESTED ||
> +			 !hwpt->domain->ops->cache_invalidate_user)) {
>  		rc = -EINVAL;
>  		goto out_abort;

Oh, we had that initially, yet lost it when splitting the series.

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

  reply	other threads:[~2024-06-28 21:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-28 16:11 [PATCH] iommufd: Require drivers to supply the cache_invalidate_user ops Jason Gunthorpe
2024-06-28 21:27 ` Nicolin Chen [this message]
2024-06-30  6:23   ` Yi Liu
2024-07-01  9:12 ` Tian, Kevin
2024-07-10 13:51 ` Jason Gunthorpe

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=Zn8qpB6Xigupm+Ge@Asurada-Nvidia \
    --to=nicolinc@nvidia.com \
    --cc=iommu@lists.linux.dev \
    --cc=jgg@nvidia.com \
    --cc=kevin.tian@intel.com \
    --cc=patches@lists.linux.dev \
    --cc=yi.l.liu@intel.com \
    /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