[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BN9PR11MB52762EC4F67AF2198EB379FF8C1C9@BN9PR11MB5276.namprd11.prod.outlook.com>
Date: Fri, 9 Dec 2022 02:50:55 +0000
From: "Tian, Kevin" <kevin.tian@...el.com>
To: Jason Gunthorpe <jgg@...pe.ca>, Christoph Hellwig <hch@....de>
CC: "Rao, Lei" <lei.rao@...el.com>,
"kbusch@...nel.org" <kbusch@...nel.org>,
"axboe@...com" <axboe@...com>, "kch@...dia.com" <kch@...dia.com>,
"sagi@...mberg.me" <sagi@...mberg.me>,
"alex.williamson@...hat.com" <alex.williamson@...hat.com>,
"cohuck@...hat.com" <cohuck@...hat.com>,
"yishaih@...dia.com" <yishaih@...dia.com>,
"shameerali.kolothum.thodi@...wei.com"
<shameerali.kolothum.thodi@...wei.com>,
"mjrosato@...ux.ibm.com" <mjrosato@...ux.ibm.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-nvme@...ts.infradead.org" <linux-nvme@...ts.infradead.org>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"Dong, Eddie" <eddie.dong@...el.com>,
"Li, Yadong" <yadong.li@...el.com>,
"Liu, Yi L" <yi.l.liu@...el.com>,
"Wilk, Konrad" <konrad.wilk@...cle.com>,
"stephen@...eticom.com" <stephen@...eticom.com>,
"Yuan, Hang" <hang.yuan@...el.com>
Subject: RE: [RFC PATCH 1/5] nvme-pci: add function nvme_submit_vf_cmd to
issue admin commands for VF driver.
> From: Jason Gunthorpe <jgg@...pe.ca>
> Sent: Thursday, December 8, 2022 4:08 AM
>
> For instance how do I trap FLR like mlx5 must do if the
> drivers/live_migration code cannot intercept the FLR VFIO ioctl?
>
> How do I mangle and share the BAR like hisilicon does?
>
> Which is really why this is in VFIO in the first place. It actually is
> coupled in practice, if not in theory.
>
Those are good questions which I also buy in to stay with the
current VFIO framework.
Actually the same controlling vs. controlled design choice also exists
in the hardware side. There are plenty of SR-IOV devices supporting
doorbells for VF (controlled function) to call services on PF (controlling
function) while the doorbell interface is implemented on the VF side.
If following the direction having controlling function to explicitly
provide services then all those doorbells should be deprecated
and instead we want explicit communications between VF driver
and PF driver.
From userspace driver p.o.v. the VFIO uAPI is kind of a device
programming interface. Here we just present everything related
to the controlled device itself (including the state management)
via a centralized portal though in the kernel there might be linkage
out of VFIO to reach the controlling driver. kind of a sw doorbell. 😊
btw just to add more background to this work. Half a year ago Lei
actually did a flavor [1] in the other way.
The controlling function of Intel IPU card also supports a network gRPC
protocol to manage the state of controlled NVMe function.
Then that series attempted to introduce an out-of-band migration
framework in Qemu so instead of doing in-line state management
via kernel VFIO uAPI Qemu can turn to an external plugin which
forwards the state cmd via gRPC to the controlling function.
Just that the controlling driver is not in the kernel.
It's dropped as the inline way was preferred.
Thanks
Kevin
[1] https://lore.kernel.org/all/20220524061848.1615706-14-lei.rao@intel.com/T/
Powered by blists - more mailing lists