[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1886d618-5539-4108-96c7-afebb65b2c80@linux.intel.com>
Date: Tue, 22 Oct 2024 11:40:11 +0800
From: Baolu Lu <baolu.lu@...ux.intel.com>
To: Nicolin Chen <nicolinc@...dia.com>, jgg@...dia.com, kevin.tian@...el.com,
will@...nel.org
Cc: baolu.lu@...ux.intel.com, joro@...tes.org, suravee.suthikulpanit@....com,
robin.murphy@....com, dwmw2@...radead.org, shuah@...nel.org,
linux-kernel@...r.kernel.org, iommu@...ts.linux.dev,
linux-arm-kernel@...ts.infradead.org, linux-kselftest@...r.kernel.org,
eric.auger@...hat.com, jean-philippe@...aro.org, mdf@...nel.org,
mshavit@...gle.com, shameerali.kolothum.thodi@...wei.com,
smostafa@...gle.com, yi.l.liu@...el.com, aik@....com,
zhangfei.gao@...aro.org, patches@...ts.linux.dev
Subject: Re: [PATCH v4 02/14] iommufd/viommu: Add IOMMU_VDEVICE_ALLOC ioctl
On 2024/10/22 8:20, Nicolin Chen wrote:
> Introduce a new ioctl to allocate a vDEVICE object. Since a vDEVICE object
> is a connection of an iommufd_iommufd object and an iommufd_viommu object,
nit:
:s/iommufd_iommufd/iommufd_device/g
or not?
> require both as the ioctl inputs and take refcounts in the ioctl handler.
>
> Add to the vIOMMU object a "vdevs" xarray, indexed by a per-vIOMMU virtual
> device ID, which can be:
> - Virtual StreamID on a nested ARM SMMUv3, an index to a Stream Table
> - Virtual DeviceID on a nested AMD IOMMU, an index to a Device Table
> - Virtual ID on a nested Intel VT-D IOMMU, an index to a Context Table
>
> Then, let the idev structure hold the allocated vdev pointer with a proper
> locking protection.
>
> Signed-off-by: Nicolin Chen<nicolinc@...dia.com>
> ---
> drivers/iommu/iommufd/iommufd_private.h | 12 +++
> include/linux/iommufd.h | 2 +
> include/uapi/linux/iommufd.h | 26 ++++++
> drivers/iommu/iommufd/device.c | 11 +++
> drivers/iommu/iommufd/main.c | 7 ++
> drivers/iommu/iommufd/viommu.c | 108 ++++++++++++++++++++++++
> 6 files changed, 166 insertions(+)
Thanks,
baolu
Powered by blists - more mailing lists