[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZS13WVj4wpHeNeKP@Asurada-Nvidia>
Date: Mon, 16 Oct 2023 10:48:09 -0700
From: Nicolin Chen <nicolinc@...dia.com>
To: "Liu, Jingqi" <jingqi.liu@...el.com>
CC: Yi Liu <yi.l.liu@...el.com>, <joro@...tes.org>,
<alex.williamson@...hat.com>, <jgg@...dia.com>,
<kevin.tian@...el.com>, <robin.murphy@....com>,
<baolu.lu@...ux.intel.com>, <cohuck@...hat.com>,
<eric.auger@...hat.com>, <kvm@...r.kernel.org>,
<mjrosato@...ux.ibm.com>, <chao.p.peng@...ux.intel.com>,
<yi.y.sun@...ux.intel.com>, <peterx@...hat.com>,
<jasowang@...hat.com>, <shameerali.kolothum.thodi@...wei.com>,
<lulu@...hat.com>, <suravee.suthikulpanit@....com>,
<iommu@...ts.linux.dev>, <linux-kernel@...r.kernel.org>,
<linux-kselftest@...r.kernel.org>, <zhenzhong.duan@...el.com>,
<joao.m.martins@...cle.com>
Subject: Re: [PATCH v2 2/6] iommufd/hw_pagetable: Use domain_alloc_user op
for domain allocation
On Mon, Oct 16, 2023 at 04:16:05PM +0800, Liu, Jingqi wrote:
> @@ -88,10 +90,19 @@ iommufd_hw_pagetable_alloc(struct iommufd_ctx *ictx, struct iommufd_ioas *ioas,
> refcount_inc(&ioas->obj.users);
> hwpt->ioas = ioas;
>
> - hwpt->domain = iommu_domain_alloc(idev->dev->bus);
> - if (!hwpt->domain) {
> - rc = -ENOMEM;
> - goto out_abort;
> + if (ops->domain_alloc_user) {
> + hwpt->domain = ops->domain_alloc_user(idev->dev, 0);
>
> Seems a "flags" parameter needs to be passed to 'domain_alloc_user()'.
> Like this:
> hwpt->domain = ops->domain_alloc_user(idev->dev, flags);
There's no "flags" parameter until the following PATCH-3:
https://lore.kernel.org/linux-iommu/20230928071528.26258-4-yi.l.liu@intel.com/
Thanks
Nicolin
Powered by blists - more mailing lists