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

Christoph Hellwig hch at infradead.org
Fri Sep 10 12:25:08 UTC 2021


On Thu, Sep 09, 2021 at 04:38:46PM -0300, 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_available() callback to set the number of available
> instances for their mtypes which is fixed at registration time. The core
> provides a standard sysfs attribute to return the available_instances.

Looks good,

Reviewed-by: Christoph Hellwig <hch at lst.de>


More information about the Intel-gfx mailing list