On Wed, Nov 25, 2026 at 08:39:47AM +0000, Alberto Faria wrote:
> diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.h 
> b/drivers/vdpa/vdpa_sim/vdpa_sim.h
> index bb137e4797633..70890974b6e56 100644
> --- a/drivers/vdpa/vdpa_sim/vdpa_sim.h
> +++ b/drivers/vdpa/vdpa_sim/vdpa_sim.h
> @@ -45,6 +45,7 @@ struct vdpasim_dev_attr {
>       u32 nas;
>  
>       void (*work_fn)(struct vdpasim *vdpasim);
> +     int (*validate_features)(u64 features);

This is okay for now. Possible future changes:
- It may be necessary to split validate_features() into
  validate_device_features() and validate_driver_features(). This is
  because the device can advertise all possible features even though
  drivers may not be allowed to enable all of them simultaneously.
- A struct vdpasim *vdpasim argument will probably be needed for checks
  that depend on the device itself.

Reviewed-by: Stefan Hajnoczi <[email protected]>


Reply via email to