Hi Kevin,
On 9/8/22 08:19, Tian, Kevin wrote:
>> From: Eric Auger
>> Sent: Thursday, September 8, 2022 3:28 AM
>>> +/*
>>> + * Alloc and initialize vfio_device so it can be registered to vfio
>>> + * core.
>>> + *
>>> + * Drivers should use the wrapper vfio_alloc_device() for allocation.
>>> + *
> From: Eric Auger
> Sent: Thursday, September 8, 2022 3:28 AM
> > +/*
> > + * Alloc and initialize vfio_device so it can be registered to vfio
> > + * core.
> > + *
> > + * Drivers should use the wrapper vfio_alloc_device() for allocation.
> > + * @size is the size of the structure to be allocate
Hi Kevin,
On 9/1/22 16:37, Kevin Tian wrote:
> The idea is to let vfio core manage the vfio_device life cycle instead
> of duplicating the logic cross drivers. This is also a preparatory
> step for adding struct device into vfio_device.
>
> New pair of helpers together with a kref in vfio_device:
>
On Wed, Sep 07, 2022 at 12:43:30AM +, Tian, Kevin wrote:
> > From: Christoph Hellwig
> > Sent: Tuesday, September 6, 2022 5:42 PM
> >
> > What is the point? This adds indirect calls, and actually creates
> > more boilerplate code in the drivers. i.g. when using this code there
> > is more, a
> From: Christoph Hellwig
> Sent: Tuesday, September 6, 2022 5:42 PM
>
> What is the point? This adds indirect calls, and actually creates
> more boilerplate code in the drivers. i.g. when using this code there
> is more, and harder to read code.
The point is to align with struct device life cy
What is the point? This adds indirect calls, and actually creates
more boilerplate code in the drivers. i.g. when using this code there
is more, and harder to read code.
The idea is to let vfio core manage the vfio_device life cycle instead
of duplicating the logic cross drivers. This is also a preparatory
step for adding struct device into vfio_device.
New pair of helpers together with a kref in vfio_device:
- vfio_alloc_device()
- vfio_put_device()
Drivers c