Archive-only list for patches
 help / color / mirror / Atom feed
From: Yi Liu <yi.l.liu@intel.com>
To: Nicolin Chen <nicolinc@nvidia.com>, Jason Gunthorpe <jgg@nvidia.com>
Cc: <iommu@lists.linux.dev>, Kevin Tian <kevin.tian@intel.com>,
	<patches@lists.linux.dev>
Subject: Re: [PATCH] iommufd: Require drivers to supply the cache_invalidate_user ops
Date: Sun, 30 Jun 2024 14:23:56 +0800	[thread overview]
Message-ID: <bd249299-5125-44ca-9548-d6d7a7cb43d6@intel.com> (raw)
In-Reply-To: <Zn8qpB6Xigupm+Ge@Asurada-Nvidia>

On 2024/6/29 05:27, Nicolin Chen wrote:
> 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>

Reviewed-by: Yi Liu <yi.l.liu@intel.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>

yes, it was dropped in v7 per a bisect concern as well. :(

v7: 
https://lore.kernel.org/linux-iommu/20231221153948.119007-1-yi.l.liu@intel.com/
  - Remove domain->ops->cache_invalidate_user check in hwpt alloc path due
    to failure in bisect (Baolu)

-- 
Regards,
Yi Liu

  reply	other threads:[~2024-06-30  6:20 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
2024-06-30  6:23   ` Yi Liu [this message]
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=bd249299-5125-44ca-9548-d6d7a7cb43d6@intel.com \
    --to=yi.l.liu@intel.com \
    --cc=iommu@lists.linux.dev \
    --cc=jgg@nvidia.com \
    --cc=kevin.tian@intel.com \
    --cc=nicolinc@nvidia.com \
    --cc=patches@lists.linux.dev \
    /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