[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250530160753.GD233377@nvidia.com>
Date: Fri, 30 May 2025 13:07:53 -0300
From: Jason Gunthorpe <jgg@...dia.com>
To: Nicolin Chen <nicolinc@...dia.com>
Cc: kevin.tian@...el.com, corbet@....net, will@...nel.org,
bagasdotme@...il.com, robin.murphy@....com, joro@...tes.org,
thierry.reding@...il.com, vdumpa@...dia.com, jonathanh@...dia.com,
shuah@...nel.org, jsnitsel@...hat.com, nathan@...nel.org,
peterz@...radead.org, yi.l.liu@...el.com, mshavit@...gle.com,
praan@...gle.com, zhangzekun11@...wei.com, iommu@...ts.linux.dev,
linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-tegra@...r.kernel.org,
linux-kselftest@...r.kernel.org, patches@...ts.linux.dev,
mochs@...dia.com, alok.a.tiwari@...cle.com, vasant.hegde@....com,
dwmw2@...radead.org, baolu.lu@...ux.intel.com
Subject: Re: [PATCH v5 13/29] iommufd/viommu: Introduce IOMMUFD_OBJ_HW_QUEUE
and its related struct
On Sat, May 17, 2025 at 08:21:30PM -0700, Nicolin Chen wrote:
> struct iommufd_viommu_ops {
> + u32 flags;
> void (*destroy)(struct iommufd_viommu *viommu);
> struct iommu_domain *(*alloc_domain_nested)(
> struct iommufd_viommu *viommu, u32 flags,
> @@ -171,6 +200,10 @@ struct iommufd_viommu_ops {
> struct device *dev,
> u64 virt_id);
> void (*vdevice_destroy)(struct iommufd_vdevice *vdev);
> + struct iommufd_hw_queue *(*hw_queue_alloc)(
> + struct iommufd_ucmd *ucmd, struct iommufd_viommu *viommu,
> + unsigned int type, u32 index, u64 base_addr, size_t length);
I think it would better to have two function pointers here than the flags:
+ struct iommufd_hw_queue *(*hw_queue_alloc)(
+ struct iommufd_ucmd *ucmd, struct iommufd_viommu *viommu,
+ unsigned int type, u32 index, u64 s2_iova, size_t length);
+ struct iommufd_hw_queue *(*hw_queue_alloc_phys)(
+ struct iommufd_ucmd *ucmd, struct iommufd_viommu *viommu,
+ unsigned int type, u32 index, phys_addr_t phys, size_t length);
Jason
Powered by blists - more mailing lists