[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BN9PR11MB52768ABB21EF05E8FF0BD2588C812@BN9PR11MB5276.namprd11.prod.outlook.com>
Date: Mon, 28 Apr 2025 00:41:33 +0000
From: "Tian, Kevin" <kevin.tian@...el.com>
To: Baolu Lu <baolu.lu@...ux.intel.com>, Nicolin Chen <nicolinc@...dia.com>,
"jgg@...dia.com" <jgg@...dia.com>, "corbet@....net" <corbet@....net>,
"will@...nel.org" <will@...nel.org>
CC: "bagasdotme@...il.com" <bagasdotme@...il.com>, "robin.murphy@....com"
<robin.murphy@....com>, "joro@...tes.org" <joro@...tes.org>,
"thierry.reding@...il.com" <thierry.reding@...il.com>, "vdumpa@...dia.com"
<vdumpa@...dia.com>, "jonathanh@...dia.com" <jonathanh@...dia.com>,
"shuah@...nel.org" <shuah@...nel.org>, "jsnitsel@...hat.com"
<jsnitsel@...hat.com>, "nathan@...nel.org" <nathan@...nel.org>,
"peterz@...radead.org" <peterz@...radead.org>, "Liu, Yi L"
<yi.l.liu@...el.com>, "mshavit@...gle.com" <mshavit@...gle.com>,
"praan@...gle.com" <praan@...gle.com>, "zhangzekun11@...wei.com"
<zhangzekun11@...wei.com>, "iommu@...ts.linux.dev" <iommu@...ts.linux.dev>,
"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>, "linux-tegra@...r.kernel.org"
<linux-tegra@...r.kernel.org>, "linux-kselftest@...r.kernel.org"
<linux-kselftest@...r.kernel.org>, "patches@...ts.linux.dev"
<patches@...ts.linux.dev>, "mochs@...dia.com" <mochs@...dia.com>,
"alok.a.tiwari@...cle.com" <alok.a.tiwari@...cle.com>, "vasant.hegde@....com"
<vasant.hegde@....com>
Subject: RE: [PATCH v2 01/22] iommufd/viommu: Add driver-allocated vDEVICE
support
> From: Baolu Lu <baolu.lu@...ux.intel.com>
> Sent: Sunday, April 27, 2025 2:24 PM
>
> On 4/26/25 13:57, Nicolin Chen wrote:
> > @@ -120,6 +128,13 @@ struct iommufd_viommu {
> > * array->entry_num to report the number of handled requests.
> > * The data structure of the array entry must be defined in
> > * include/uapi/linux/iommufd.h
> > + * @vdevice_alloc: Allocate a vDEVICE object and init its driver-level
> structure
> > + * or HW procedure. Note that the core-level structure is filled
> > + * by the iommufd core after calling this op. @virt_id carries a
> > + * per-vIOMMU virtual ID for the driver to initialize its HW.
>
> I'm wondering whether the 'per-vIOMMU virtual ID' is intended to be
> generic for other features that might require a vdevice. I'm also not
> sure where this virtual ID originates when I read it here. Could it
for PCI it's the virtual BDF in the guest PCI topology, hence provided
by the VMM when calling @vdevice_alloc:
> potentially come from the KVM instance? If so, how about retrieving it
> directly from a struct kvm pointer? My understanding is that vIOMMU in
> IOMMUFD acts as a handle to KVM, so perhaps we should maintain a
> reference to the kvm pointer within the iommufd_viommu structure?
>
It's OK to maintain a KVM pointer in viommu (for which I recall
such discussion for confidential io), but obviously it's not the
requirement in this series.
Powered by blists - more mailing lists