RE: [PATCH v2 15/15] vfio: Add struct device to vfio_device

2022-09-08 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Thursday, September 8, 2022 8:37 PM > > On Thu, Sep 08, 2022 at 11:39:07AM +0200, Eric Auger wrote: > > > >> I am not totally clear about remaining 'struct device *dev;' in > > >> vfio_device struct. I see it used in some places. Is it supposed to > > >> disappear

Re: [PATCH v2 15/15] vfio: Add struct device to vfio_device

2022-09-08 Thread Jason Gunthorpe
On Thu, Sep 08, 2022 at 11:39:07AM +0200, Eric Auger wrote: > >> I am not totally clear about remaining 'struct device *dev;' in > >> vfio_device struct. I see it used in some places. Is it supposed to > >> disappear at some point? > > > > no, Eric. *dev will not disappear, it stores the dev

Re: [PATCH v2 15/15] vfio: Add struct device to vfio_device

2022-09-08 Thread Eric Auger
On 9/8/22 11:17, Yi Liu wrote: > On 2022/9/8 17:06, Eric Auger wrote: >> Hi Kevin, >> >> On 9/1/22 16:37, Kevin Tian wrote: >>> From: Yi Liu >>> >>> and replace kref. With it a 'vfio-dev/vfioX' node is created under the >>> sysfs path of the parent, indicating the device is bound to a vfio >>>

Re: [PATCH v2 15/15] vfio: Add struct device to vfio_device

2022-09-08 Thread Yi Liu
On 2022/9/8 17:06, Eric Auger wrote: Hi Kevin, On 9/1/22 16:37, Kevin Tian wrote: From: Yi Liu and replace kref. With it a 'vfio-dev/vfioX' node is created under the sysfs path of the parent, indicating the device is bound to a vfio driver, e.g.:

Re: [PATCH v2 15/15] vfio: Add struct device to vfio_device

2022-09-08 Thread Eric Auger
Hi Kevin, On 9/1/22 16:37, Kevin Tian wrote: > From: Yi Liu > > and replace kref. With it a 'vfio-dev/vfioX' node is created under the > sysfs path of the parent, indicating the device is bound to a vfio > driver, e.g.: > > /sys/devices/pci\:6f/\:6f\:01.0/vfio-dev/vfio0 > > It is also a

RE: [PATCH v2 15/15] vfio: Add struct device to vfio_device

2022-09-01 Thread Tian, Kevin
> From: Tian, Kevin > Sent: Thursday, September 1, 2022 10:38 PM > > diff --git a/Documentation/ABI/testing/sysfs-devices-vfio-dev > b/Documentation/ABI/testing/sysfs-devices-vfio-dev > new file mode 100644 > index ..e21424fd9666 > --- /dev/null > +++