search for: mdev_id_vendor

Displaying 7 results from an estimated 7 matches for "mdev_id_vendor".

2019 Oct 17
2
[PATCH V3 4/7] mdev: introduce device specific ops
...dev, const struct >>> virtio_mdev_ops *virtio_ops) { >>> mdev->device_ops = virtio_ops; >>> mdev->class_id = MDEV_ID_VHOST; >>> } >>> >>> void mdev_set_vendor_ops(struct mdev_device *mdev) /* no ops */ { >>> mdev->class_id = MDEV_ID_VENDOR; >>> } > One further step towards making this hard to use incorrectly might be > to return an error if class_id is already set. Thanks, > > Alex I will add a BUG_ON() when class_id has already set. Thanks
2019 Oct 17
2
[PATCH V3 4/7] mdev: introduce device specific ops
...dev, const struct >>> virtio_mdev_ops *virtio_ops) { >>> mdev->device_ops = virtio_ops; >>> mdev->class_id = MDEV_ID_VHOST; >>> } >>> >>> void mdev_set_vendor_ops(struct mdev_device *mdev) /* no ops */ { >>> mdev->class_id = MDEV_ID_VENDOR; >>> } > One further step towards making this hard to use incorrectly might be > to return an error if class_id is already set. Thanks, > > Alex I will add a BUG_ON() when class_id has already set. Thanks
2019 Oct 17
0
[PATCH V3 4/7] mdev: introduce device specific ops
...virtio_mdev_ops *virtio_ops) { > >>> mdev->device_ops = virtio_ops; > >>> mdev->class_id = MDEV_ID_VHOST; > >>> } > >>> > >>> void mdev_set_vendor_ops(struct mdev_device *mdev) /* no ops */ { > >>> mdev->class_id = MDEV_ID_VENDOR; > >>> } > > One further step towards making this hard to use incorrectly might be > > to return an error if class_id is already set. Thanks, > > > > Alex > > > I will add a BUG_ON() when class_id has already set. Probably better a WARN_ON()?
2019 Oct 16
0
[PATCH V3 4/7] mdev: introduce device specific ops
...ops; mdev->class_id = MDEV_ID_VIRTIO; } void mdev_set_vhost_ops(struct mdev_device *mdev, const struct virtio_mdev_ops *virtio_ops) { mdev->device_ops = virtio_ops; mdev->class_id = MDEV_ID_VHOST; } void mdev_set_vendor_ops(struct mdev_device *mdev) /* no ops */ { mdev->class_id = MDEV_ID_VENDOR; }
2019 Oct 16
0
[PATCH V3 4/7] mdev: introduce device specific ops
...truct mdev_device *mdev, const struct > > virtio_mdev_ops *virtio_ops) { > > mdev->device_ops = virtio_ops; > > mdev->class_id = MDEV_ID_VHOST; > > } > > > > void mdev_set_vendor_ops(struct mdev_device *mdev) /* no ops */ { > > mdev->class_id = MDEV_ID_VENDOR; > > } One further step towards making this hard to use incorrectly might be to return an error if class_id is already set. Thanks, Alex
2019 Oct 15
6
[PATCH V3 4/7] mdev: introduce device specific ops
On Fri, 11 Oct 2019 16:15:54 +0800 Jason Wang <jasowang at redhat.com> wrote: > Currently, except for the create and remove, the rest of > mdev_parent_ops is designed for vfio-mdev driver only and may not help > for kernel mdev driver. With the help of class id, this patch > introduces device specific callbacks inside mdev_device > structure. This allows different set of
2019 Oct 15
6
[PATCH V3 4/7] mdev: introduce device specific ops
On Fri, 11 Oct 2019 16:15:54 +0800 Jason Wang <jasowang at redhat.com> wrote: > Currently, except for the create and remove, the rest of > mdev_parent_ops is designed for vfio-mdev driver only and may not help > for kernel mdev driver. With the help of class id, this patch > introduces device specific callbacks inside mdev_device > structure. This allows different set of