[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240927140141.GA4568@nvidia.com>
Date: Fri, 27 Sep 2024 11:01:41 -0300
From: Jason Gunthorpe <jgg@...dia.com>
To: Mostafa Saleh <smostafa@...gle.com>
Cc: Nicolin Chen <nicolinc@...dia.com>, kevin.tian@...el.com,
will@...nel.org, joro@...tes.org, suravee.suthikulpanit@....com,
robin.murphy@....com, dwmw2@...radead.org, baolu.lu@...ux.intel.com,
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, yi.l.liu@...el.com
Subject: Re: [PATCH v2 06/19] iommufd/viommu: Add
IOMMU_VIOMMU_SET/UNSET_VDEV_ID ioctl
On Fri, Sep 27, 2024 at 01:50:52PM +0000, Mostafa Saleh wrote:
> My understanding of IOMMUFD is very little, but AFAICT, that means that
> it’s assumed that each device can only have one stream ID(RID)?
>
> As I can see in patch 17 in arm_smmu_convert_viommu_vdev_id(), it
> converts the virtual ID to a physical one using master->streams[0].id.
>
> Is that correct or am I missing something?
>
> As I am looking at similar problem for paravirtual IOMMU with pKVM, where
> the UAPI would be something similar to:
>
> GET_NUM_END_POINTS(dev) => nr_sids
>
> SET_END_POINT_VSID(dev, sid_index, vsid)
>
> Similar to what VFIO does with IRQs.
>
> As a device can have many SIDs.
We don't support multi SID through this interface, at least in this
version.
To do multi-sid you have to inform the VM of all the different pSIDs
the device has and then setup the vSID/pSID translation to map them
all to the HW invalidation logic.
Which is alot more steps, and we have no use case right now. Multi-sid
is also not something I expect to see in any modern PCI device, and
this is VFIO PCI...
Jason
Powered by blists - more mailing lists