[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aBHYN39FcH+NG5Ab@Asurada-Nvidia>
Date: Wed, 30 Apr 2025 00:58:47 -0700
From: Nicolin Chen <nicolinc@...dia.com>
To: Alexey Kardashevskiy <aik@....com>
CC: Jason Gunthorpe <jgg@...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>,
<smostafa@...gle.com>, <yi.l.liu@...el.com>
Subject: Re: [PATCH v2 06/19] iommufd/viommu: Add
IOMMU_VIOMMU_SET/UNSET_VDEV_ID ioctl
On Wed, Apr 30, 2025 at 05:54:53PM +1000, Alexey Kardashevskiy wrote:
> On 4/10/24 21:41, Jason Gunthorpe wrote:
> > On Fri, Oct 04, 2024 at 02:32:28PM +1000, Alexey Kardashevskiy wrote:
> >
> > > > + __u32 __reserved;
> > > > + __aligned_u64 vdev_id;
>
> I believe this ended up being "virt_id"...
Yes.
> > >
> > > What is the nature of this id?
> >
> > It should be the vIOMMU's HW representation for the virtual device.
> >
> > On ARM it is the stream id, the index into the Stream Table
> >
> > On AMD it would be the "DeviceID" the index in the Device Table
>
>
> ... and I just hit a problem with it - this is basically guest BDFn
> and it works as long as I'm hotplugging the TEE-IO VF into an SNP VM
> but does not when I pass through via the QEMU cmdline - bus numbers
> are not assigned yet. So I have to postpone the vdevice allocation
> till run time, did I miss something here? Thanks,
I have a similar case with QEMU ARM64's VM: so vDEVICE on ARM is
allocated at runtime as well because the BDF number isn't ready
at the boot time.
Nicolin
Powered by blists - more mailing lists