search for: vfio_mdev_ops

Displaying 20 results from an estimated 53 matches for "vfio_mdev_ops".

2019 Sep 17
2
[RFC PATCH 2/2] mdev: introduce device specific ops
..., > } > } > > -static const struct mdev_parent_ops vfio_ccw_mdev_ops = { > - .owner = THIS_MODULE, > - .supported_type_groups = mdev_type_groups, > - .create = vfio_ccw_mdev_create, > - .remove = vfio_ccw_mdev_remove, > +static const struct vfio_mdev_parent_ops vfio_mdev_ops = { > .open = vfio_ccw_mdev_open, > .release = vfio_ccw_mdev_release, > .read = vfio_ccw_mdev_read, > @@ -576,6 +572,14 @@ static const struct mdev_parent_ops > vfio_ccw_mdev_ops = { > .ioctl = vfio_ccw_mdev_ioctl, > }; > > +static const struct mdev_paren...
2019 Sep 17
2
[RFC PATCH 2/2] mdev: introduce device specific ops
..., > } > } > > -static const struct mdev_parent_ops vfio_ccw_mdev_ops = { > - .owner = THIS_MODULE, > - .supported_type_groups = mdev_type_groups, > - .create = vfio_ccw_mdev_create, > - .remove = vfio_ccw_mdev_remove, > +static const struct vfio_mdev_parent_ops vfio_mdev_ops = { > .open = vfio_ccw_mdev_open, > .release = vfio_ccw_mdev_release, > .read = vfio_ccw_mdev_read, > @@ -576,6 +572,14 @@ static const struct mdev_parent_ops > vfio_ccw_mdev_ops = { > .ioctl = vfio_ccw_mdev_ioctl, > }; > > +static const struct mdev_paren...
2019 Sep 12
0
[RFC PATCH 2/2] mdev: introduce device specific ops
...vfio_ccw_mdev_ioctl(struct mdev_device *mdev, } } -static const struct mdev_parent_ops vfio_ccw_mdev_ops = { - .owner = THIS_MODULE, - .supported_type_groups = mdev_type_groups, - .create = vfio_ccw_mdev_create, - .remove = vfio_ccw_mdev_remove, +static const struct vfio_mdev_parent_ops vfio_mdev_ops = { .open = vfio_ccw_mdev_open, .release = vfio_ccw_mdev_release, .read = vfio_ccw_mdev_read, @@ -576,6 +572,14 @@ static const struct mdev_parent_ops vfio_ccw_mdev_ops = { .ioctl = vfio_ccw_mdev_ioctl, }; +static const struct mdev_parent_ops vfio_ccw_mdev_ops = { + .owner = THI...
2019 Sep 17
0
[RFC PATCH 2/2] mdev: introduce device specific ops
...>> -static const struct mdev_parent_ops vfio_ccw_mdev_ops = { >> - .owner = THIS_MODULE, >> - .supported_type_groups = mdev_type_groups, >> - .create = vfio_ccw_mdev_create, >> - .remove = vfio_ccw_mdev_remove, >> +static const struct vfio_mdev_parent_ops vfio_mdev_ops = { >> .open = vfio_ccw_mdev_open, >> .release = vfio_ccw_mdev_release, >> .read = vfio_ccw_mdev_read, >> @@ -576,6 +572,14 @@ static const struct mdev_parent_ops >> vfio_ccw_mdev_ops = { >> .ioctl = vfio_ccw_mdev_ioctl, >> }; >>...
2019 Sep 24
3
[PATCH V2 5/8] mdev: introduce device specific ops
...e <linux/mdev.h> > +#include <linux/vfio_mdev.h> > #include <linux/nospec.h> > #include <linux/slab.h> > > @@ -110,6 +111,8 @@ static struct attribute_group *mdev_type_groups[] = { > NULL, > }; > > +static const struct vfio_mdev_device_ops vfio_mdev_ops; > + > static int vfio_ccw_mdev_create(struct kobject *kobj, struct mdev_device *mdev) > { > struct vfio_ccw_private *private = > @@ -130,6 +133,7 @@ static int vfio_ccw_mdev_create(struct kobject *kobj, struct mdev_device *mdev) > private->sch->schid.sch_no); &gt...
2019 Sep 24
3
[PATCH V2 5/8] mdev: introduce device specific ops
...e <linux/mdev.h> > +#include <linux/vfio_mdev.h> > #include <linux/nospec.h> > #include <linux/slab.h> > > @@ -110,6 +111,8 @@ static struct attribute_group *mdev_type_groups[] = { > NULL, > }; > > +static const struct vfio_mdev_device_ops vfio_mdev_ops; > + > static int vfio_ccw_mdev_create(struct kobject *kobj, struct mdev_device *mdev) > { > struct vfio_ccw_private *private = > @@ -130,6 +133,7 @@ static int vfio_ccw_mdev_create(struct kobject *kobj, struct mdev_device *mdev) > private->sch->schid.sch_no); &gt...
2019 Oct 17
0
[PATCH V4 3/6] mdev: introduce device specific ops
...+As multiple types of mediated devices may be supported, the device +must set up the class id and the device specific callbacks in create() +callback. E.g for vfio-mdev device it needs to be done through: + + int mdev_set_vfio_ops(struct mdev_device *mdev, + const struct vfio_mdev_ops *vfio_ops); + +The class id (set to MDEV_CLASS_ID_VFIO) is used to match a device +with an mdev driver via its id table. The device specific callbacks +(specified in *ops) are obtainable via mdev_get_dev_ops() (for use by +the mdev bus driver). A vfio-mdev device (class id MDEV_CLASS_ID_VFIO) +uses...
2019 Sep 24
0
[PATCH V2 5/8] mdev: introduce device specific ops
...@@ #include <linux/vfio.h> #include <linux/mdev.h> +#include <linux/vfio_mdev.h> #include <linux/nospec.h> #include <linux/slab.h> @@ -110,6 +111,8 @@ static struct attribute_group *mdev_type_groups[] = { NULL, }; +static const struct vfio_mdev_device_ops vfio_mdev_ops; + static int vfio_ccw_mdev_create(struct kobject *kobj, struct mdev_device *mdev) { struct vfio_ccw_private *private = @@ -130,6 +133,7 @@ static int vfio_ccw_mdev_create(struct kobject *kobj, struct mdev_device *mdev) private->sch->schid.sch_no); mdev_set_class_id(mdev, MDEV_...
2019 Sep 23
0
[PATCH 2/6] mdev: introduce device specific ops
...vfio_ccw_mdev_ioctl(struct mdev_device *mdev, } } -static const struct mdev_parent_ops vfio_ccw_mdev_ops = { - .owner = THIS_MODULE, - .supported_type_groups = mdev_type_groups, - .create = vfio_ccw_mdev_create, - .remove = vfio_ccw_mdev_remove, +static const struct vfio_mdev_parent_ops vfio_mdev_ops = { .open = vfio_ccw_mdev_open, .release = vfio_ccw_mdev_release, .read = vfio_ccw_mdev_read, @@ -586,6 +583,14 @@ static const struct mdev_parent_ops vfio_ccw_mdev_ops = { .ioctl = vfio_ccw_mdev_ioctl, }; +static const struct mdev_parent_ops vfio_ccw_mdev_ops = { + .owner = THI...
2019 Oct 21
0
[PATCH V4 3/6] mdev: introduce device specific ops
...supported, the device must >> +set up the class id and the device specific callbacks in create() >> +callback. E.g for vfio-mdev device it needs to be done through: >> + >> + int mdev_set_vfio_ops(struct mdev_device *mdev, >> + const struct vfio_mdev_ops *vfio_ops); >> + >> +The class id (set to MDEV_CLASS_ID_VFIO) is used to match a device with >> +an mdev driver via its id table. The device specific callbacks >> +(specified in *ops) are obtainable via mdev_get_dev_ops() (for use by >> +the mdev bus driver). A vfio-md...
2019 Oct 11
0
[PATCH V3 4/7] mdev: introduce device specific ops
...@@ #include <linux/vfio.h> #include <linux/mdev.h> +#include <linux/vfio_mdev.h> #include <linux/nospec.h> #include <linux/slab.h> @@ -110,6 +111,8 @@ static struct attribute_group *mdev_type_groups[] = { NULL, }; +static const struct vfio_mdev_device_ops vfio_mdev_ops; + static int vfio_ccw_mdev_create(struct kobject *kobj, struct mdev_device *mdev) { struct vfio_ccw_private *private = @@ -129,7 +132,7 @@ static int vfio_ccw_mdev_create(struct kobject *kobj, struct mdev_device *mdev) private->sch->schid.ssid, private->sch->schid.sch...
2019 Sep 25
0
[PATCH V2 5/8] mdev: introduce device specific ops
...;linux/vfio_mdev.h> > > #include <linux/nospec.h> > > #include <linux/slab.h> > > > > @@ -110,6 +111,8 @@ static struct attribute_group *mdev_type_groups[] > = { > > NULL, > > }; > > > > +static const struct vfio_mdev_device_ops vfio_mdev_ops; > > + > > static int vfio_ccw_mdev_create(struct kobject *kobj, struct mdev_device > *mdev) > > { > > struct vfio_ccw_private *private = > > @@ -130,6 +133,7 @@ static int vfio_ccw_mdev_create(struct kobject > *kobj, struct mdev_device *mdev) > >...
2019 Sep 18
1
[RFC PATCH 2/2] mdev: introduce device specific ops
...truct mdev_parent_ops vfio_ccw_mdev_ops = { > >> - .owner = THIS_MODULE, > >> - .supported_type_groups = mdev_type_groups, > >> - .create = vfio_ccw_mdev_create, > >> - .remove = vfio_ccw_mdev_remove, > >> +static const struct vfio_mdev_parent_ops vfio_mdev_ops = { > >> .open = vfio_ccw_mdev_open, > >> .release = vfio_ccw_mdev_release, > >> .read = vfio_ccw_mdev_read, > >> @@ -576,6 +572,14 @@ static const struct mdev_parent_ops > >> vfio_ccw_mdev_ops = { > >> .ioctl = vfio_ccw_mdev_...
2019 Sep 24
0
[PATCH 2/6] mdev: introduce device specific ops
...>> -static const struct mdev_parent_ops vfio_ccw_mdev_ops = { >> - .owner = THIS_MODULE, >> - .supported_type_groups = mdev_type_groups, >> - .create = vfio_ccw_mdev_create, >> - .remove = vfio_ccw_mdev_remove, >> +static const struct vfio_mdev_parent_ops vfio_mdev_ops = { >> .open = vfio_ccw_mdev_open, >> .release = vfio_ccw_mdev_release, >> .read = vfio_ccw_mdev_read, >> @@ -586,6 +583,14 @@ static const struct mdev_parent_ops >> vfio_ccw_mdev_ops = { >> .ioctl = vfio_ccw_mdev_ioctl, >> }; >> >&...
2019 Sep 12
9
[RFC PATCH 0/2] Mdev: support mutiple kinds of devices
Hi all: During the development of virtio-mdev[1]. I find that mdev needs to be extended to support devices other than vfio mdev device. So this series tries to extend the mdev to be able to differ from different devices by: - device id and matching for mdev bus - device speicfic callbacks and move vfio callbacks there Sent for early reivew, compile test only! Thanks [1]
2019 Sep 12
9
[RFC PATCH 0/2] Mdev: support mutiple kinds of devices
Hi all: During the development of virtio-mdev[1]. I find that mdev needs to be extended to support devices other than vfio mdev device. So this series tries to extend the mdev to be able to differ from different devices by: - device id and matching for mdev bus - device speicfic callbacks and move vfio callbacks there Sent for early reivew, compile test only! Thanks [1]
2019 Oct 30
8
[PATCH V6 0/6] mdev based hardware virtio offloading support
...introduce class specific helper for getting is device ops - use WARN_ON instead of BUG_ON in mdev_set_virtio_ops - explain details of get_mdev_features() and get_vendor_id() - distinguish the optional virito device ops from mandatory ones and make get_generation() optional - rename vfio_mdev.h to vfio_mdev_ops.h, rename virito_mdev.h to virtio_mdev_ops.h - don't abuse version fileds in virtio_mdev structure, use features instead - fix warning during device remove - style & docs tweaks and typo fixes Changes from V3: - document that class id (device ops) must be specified in create() - add W...
2019 Oct 16
0
[PATCH V3 4/7] mdev: introduce device specific ops
...roach was chosen for > > simplicity. We could still do something like: > > > > int mdev_set_class_struct(struct device *dev, const struct mdev_class_struct > > *class); > > > > struct mdev_class_struct { > > u16 id; > > union { > > struct vfio_mdev_ops vfio_ops; > > struct virtio_mdev_ops virtio_ops; > > }; > > }; > > > > Maybe even: > > > > struct vfio_mdev_ops *mdev_get_vfio_ops(struct mdev_device *mdev) { > > BUG_ON(mdev->class.id != MDEV_ID_VFIO); > > return &mdev->class.v...
2019 Sep 25
3
[PATCH V2 5/8] mdev: introduce device specific ops
...<linux/nospec.h> > > > #include <linux/slab.h> > > > > > > @@ -110,6 +111,8 @@ static struct attribute_group *mdev_type_groups[] > > = { > > > NULL, > > > }; > > > > > > +static const struct vfio_mdev_device_ops vfio_mdev_ops; > > > + > > > static int vfio_ccw_mdev_create(struct kobject *kobj, struct > mdev_device > > *mdev) > > > { > > > struct vfio_ccw_private *private = > > > @@ -130,6 +133,7 @@ static int vfio_ccw_mdev_create(struct kobject > > *kobj,...
2019 Sep 25
3
[PATCH V2 5/8] mdev: introduce device specific ops
...<linux/nospec.h> > > > #include <linux/slab.h> > > > > > > @@ -110,6 +111,8 @@ static struct attribute_group *mdev_type_groups[] > > = { > > > NULL, > > > }; > > > > > > +static const struct vfio_mdev_device_ops vfio_mdev_ops; > > > + > > > static int vfio_ccw_mdev_create(struct kobject *kobj, struct > mdev_device > > *mdev) > > > { > > > struct vfio_ccw_private *private = > > > @@ -130,6 +133,7 @@ static int vfio_ccw_mdev_create(struct kobject > > *kobj,...