Re: [PATCH v2 6/9] vfio/mdev: Add mdev available instance checking to the core

2021-09-23 Thread Eric Farman
On Tue, 2021-09-21 at 10:19 -0300, Jason Gunthorpe wrote: > On Mon, Sep 20, 2021 at 08:02:29PM +0200, Cornelia Huck wrote: > > On Thu, Sep 09 2021, Jason Gunthorpe wrote: > > > > > Many of the mdev drivers use a simple counter for keeping track > > > of the > > > available instances. Move this co

Re: [PATCH v2 6/9] vfio/mdev: Add mdev available instance checking to the core

2021-09-21 Thread Jason Gunthorpe
On Mon, Sep 20, 2021 at 08:02:29PM +0200, Cornelia Huck wrote: > On Thu, Sep 09 2021, Jason Gunthorpe wrote: > > > Many of the mdev drivers use a simple counter for keeping track of the > > available instances. Move this code to the core code and store the counter > > in the mdev_type. Implement

Re: [PATCH v2 6/9] vfio/mdev: Add mdev available instance checking to the core

2021-09-20 Thread Cornelia Huck
On Thu, Sep 09 2021, Jason Gunthorpe wrote: > Many of the mdev drivers use a simple counter for keeping track of the > available instances. Move this code to the core code and store the counter > in the mdev_type. Implement it using correct locking, fixing mdpy. > > Drivers provide a get_availabl

[PATCH v2 6/9] vfio/mdev: Add mdev available instance checking to the core

2021-09-09 Thread Jason Gunthorpe
Many of the mdev drivers use a simple counter for keeping track of the available instances. Move this code to the core code and store the counter in the mdev_type. Implement it using correct locking, fixing mdpy. Drivers provide a get_available() callback to set the number of available instances f