On 2018.11.26 13:38:41 +0100, Cornelia Huck wrote: > On Mon, 26 Nov 2018 16:48:52 +0800 > Zhenyu Wang <zhenyuw@xxxxxxxxxxxxxxx> wrote: > > > For supported mdev driver to create aggregated device, this creates > > new "aggregation" attribute for target type, which will show maximum > > number of instance resources that can be aggregated. > > > > Cc: Kirti Wankhede <kwankhede@xxxxxxxxxx> > > Cc: Alex Williamson <alex.williamson@xxxxxxxxxx> > > Cc: Kevin Tian <kevin.tian@xxxxxxxxx> > > Cc: Cornelia Huck <cohuck@xxxxxxxxxx> > > Signed-off-by: Zhenyu Wang <zhenyuw@xxxxxxxxxxxxxxx> > > --- > > drivers/vfio/mdev/mdev_core.c | 19 +++++++++++++++++++ > > drivers/vfio/mdev/mdev_private.h | 2 ++ > > drivers/vfio/mdev/mdev_sysfs.c | 22 ++++++++++++++++++++++ > > include/linux/mdev.h | 8 ++++++++ > > 4 files changed, 51 insertions(+) > > (...) > > > @@ -145,6 +157,14 @@ struct mdev_type *add_mdev_supported_type(struct mdev_parent *parent, > > if (ret) > > goto attr_create_failed; > > > > + if (parent->ops->create_with_instances && > > + parent->ops->max_aggregated_instances) { > > Should we actually require that any driver providing > ->create_with_instances must also provide ->max_aggregated_instances? > yes, I think that's required. -- Open Source Technology Center, Intel ltd. $gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827
Attachment:
signature.asc
Description: PGP signature