search for: virtio_mdev_device_op

Displaying 20 results from an estimated 75 matches for "virtio_mdev_device_op".

Did you mean: virtio_mdev_device_ops
2019 Oct 29
2
[PATCH v3] vhost: introduce mdev based hardware backend
...,6 +96,26 @@ mdev_get_virtio_ops(struct mdev_device *mdev) } EXPORT_SYMBOL(mdev_get_virtio_ops); +/* Specify the vhost device ops for the mdev device, this + * must be called during create() callback for vhost mdev device. + */ +void mdev_set_vhost_ops(struct mdev_device *mdev, + const struct virtio_mdev_device_ops *vhost_ops) +{ + mdev_set_class(mdev, MDEV_CLASS_ID_VHOST); + mdev->vhost_ops = vhost_ops; +} +EXPORT_SYMBOL(mdev_set_vhost_ops); + +/* Get the vhost device ops for the mdev device. */ +const struct virtio_mdev_device_ops * +mdev_get_vhost_ops(struct mdev_device *mdev) +{ + WARN_ON(mdev->cla...
2019 Oct 29
2
[PATCH v3] vhost: introduce mdev based hardware backend
...,6 +96,26 @@ mdev_get_virtio_ops(struct mdev_device *mdev) } EXPORT_SYMBOL(mdev_get_virtio_ops); +/* Specify the vhost device ops for the mdev device, this + * must be called during create() callback for vhost mdev device. + */ +void mdev_set_vhost_ops(struct mdev_device *mdev, + const struct virtio_mdev_device_ops *vhost_ops) +{ + mdev_set_class(mdev, MDEV_CLASS_ID_VHOST); + mdev->vhost_ops = vhost_ops; +} +EXPORT_SYMBOL(mdev_set_vhost_ops); + +/* Get the vhost device ops for the mdev device. */ +const struct virtio_mdev_device_ops * +mdev_get_vhost_ops(struct mdev_device *mdev) +{ + WARN_ON(mdev->cla...
2019 Oct 30
1
[PATCH v3] vhost: introduce mdev based hardware backend
...; EXPORT_SYMBOL(mdev_get_virtio_ops); > > > > +/* Specify the vhost device ops for the mdev device, this > > + * must be called during create() callback for vhost mdev device. > > + */ > > +void mdev_set_vhost_ops(struct mdev_device *mdev, > > + const struct virtio_mdev_device_ops *vhost_ops) > > +{ > > + mdev_set_class(mdev, MDEV_CLASS_ID_VHOST); > > + mdev->vhost_ops = vhost_ops; > > +} > > +EXPORT_SYMBOL(mdev_set_vhost_ops); > > + > > +/* Get the vhost device ops for the mdev device. */ > > +const struct virtio_mdev_devi...
2019 Oct 31
2
[PATCH v4] vhost: introduce mdev based hardware backend
...,6 +96,26 @@ mdev_get_virtio_ops(struct mdev_device *mdev) } EXPORT_SYMBOL(mdev_get_virtio_ops); +/* Specify the vhost device ops for the mdev device, this + * must be called during create() callback for vhost mdev device. + */ +void mdev_set_vhost_ops(struct mdev_device *mdev, + const struct virtio_mdev_device_ops *vhost_ops) +{ + mdev_set_class(mdev, MDEV_CLASS_ID_VHOST); + mdev->vhost_ops = vhost_ops; +} +EXPORT_SYMBOL(mdev_set_vhost_ops); + +/* Get the vhost device ops for the mdev device. */ +const struct virtio_mdev_device_ops * +mdev_get_vhost_ops(struct mdev_device *mdev) +{ + WARN_ON(mdev->cla...
2019 Oct 31
2
[PATCH v4] vhost: introduce mdev based hardware backend
...,6 +96,26 @@ mdev_get_virtio_ops(struct mdev_device *mdev) } EXPORT_SYMBOL(mdev_get_virtio_ops); +/* Specify the vhost device ops for the mdev device, this + * must be called during create() callback for vhost mdev device. + */ +void mdev_set_vhost_ops(struct mdev_device *mdev, + const struct virtio_mdev_device_ops *vhost_ops) +{ + mdev_set_class(mdev, MDEV_CLASS_ID_VHOST); + mdev->vhost_ops = vhost_ops; +} +EXPORT_SYMBOL(mdev_set_vhost_ops); + +/* Get the vhost device ops for the mdev device. */ +const struct virtio_mdev_device_ops * +mdev_get_vhost_ops(struct mdev_device *mdev) +{ + WARN_ON(mdev->cla...
2019 Oct 30
0
[PATCH v3] vhost: introduce mdev based hardware backend
...mdev_device *mdev) > } > EXPORT_SYMBOL(mdev_get_virtio_ops); > > +/* Specify the vhost device ops for the mdev device, this > + * must be called during create() callback for vhost mdev device. > + */ > +void mdev_set_vhost_ops(struct mdev_device *mdev, > + const struct virtio_mdev_device_ops *vhost_ops) > +{ > + mdev_set_class(mdev, MDEV_CLASS_ID_VHOST); > + mdev->vhost_ops = vhost_ops; > +} > +EXPORT_SYMBOL(mdev_set_vhost_ops); > + > +/* Get the vhost device ops for the mdev device. */ > +const struct virtio_mdev_device_ops * > +mdev_get_vhost_ops(struct...
2019 Oct 17
0
[PATCH V4 5/6] virtio: introduce a mdev based transport
...virtio_mdev_device *vm_dev = to_virtio_mdev_device(vdev); + struct mdev_device *mdev = vm_dev->mdev; + + return mdev; +} + +static void virtio_mdev_get(struct virtio_device *vdev, unsigned offset, + void *buf, unsigned len) +{ + struct mdev_device *mdev = vm_get_mdev(vdev); + const struct virtio_mdev_device_ops *ops = mdev_get_dev_ops(mdev); + + ops->get_config(mdev, offset, buf, len); +} + +static void virtio_mdev_set(struct virtio_device *vdev, unsigned offset, + const void *buf, unsigned len) +{ + struct mdev_device *mdev = vm_get_mdev(vdev); + const struct virtio_mdev_device_ops *ops = mdev_...
2019 Oct 11
0
[PATCH V3 6/7] virtio: introduce a mdev based transport
...virtio_mdev_device *vm_dev = to_virtio_mdev_device(vdev); + struct mdev_device *mdev = vm_dev->mdev; + + return mdev; +} + +static void virtio_mdev_get(struct virtio_device *vdev, unsigned offset, + void *buf, unsigned len) +{ + struct mdev_device *mdev = vm_get_mdev(vdev); + const struct virtio_mdev_device_ops *ops = mdev_get_dev_ops(mdev); + + ops->get_config(mdev, offset, buf, len); +} + +static void virtio_mdev_set(struct virtio_device *vdev, unsigned offset, + const void *buf, unsigned len) +{ + struct mdev_device *mdev = vm_get_mdev(vdev); + const struct virtio_mdev_device_ops *ops = mdev_...
2019 Oct 23
2
[PATCH V5 4/6] mdev: introduce virtio device and its device ops
...ev_device *mdev) > } > EXPORT_SYMBOL(mdev_get_vfio_ops); > > +/* Specify the virtio device ops for the mdev device, this > + * must be called during create() callback for virtio mdev device. > + */ > +void mdev_set_virtio_ops(struct mdev_device *mdev, > + const struct virtio_mdev_device_ops *virtio_ops) > +{ > + mdev_set_class(mdev, MDEV_CLASS_ID_VIRTIO); > + mdev->virtio_ops = virtio_ops; > +} > +EXPORT_SYMBOL(mdev_set_virtio_ops); > + > +/* Get the virtio device ops for the mdev device. */ > +const struct virtio_mdev_device_ops * > +mdev_get_virtio_ops...
2019 Oct 23
2
[PATCH V5 4/6] mdev: introduce virtio device and its device ops
...ev_device *mdev) > } > EXPORT_SYMBOL(mdev_get_vfio_ops); > > +/* Specify the virtio device ops for the mdev device, this > + * must be called during create() callback for virtio mdev device. > + */ > +void mdev_set_virtio_ops(struct mdev_device *mdev, > + const struct virtio_mdev_device_ops *virtio_ops) > +{ > + mdev_set_class(mdev, MDEV_CLASS_ID_VIRTIO); > + mdev->virtio_ops = virtio_ops; > +} > +EXPORT_SYMBOL(mdev_set_virtio_ops); > + > +/* Get the virtio device ops for the mdev device. */ > +const struct virtio_mdev_device_ops * > +mdev_get_virtio_ops...
2019 Oct 24
1
[PATCH V5 4/6] mdev: introduce virtio device and its device ops
...fio_ops); > >> > >> +/* Specify the virtio device ops for the mdev device, this > >> + * must be called during create() callback for virtio mdev device. > >> + */ > >> +void mdev_set_virtio_ops(struct mdev_device *mdev, > >> + const struct virtio_mdev_device_ops *virtio_ops) > >> +{ > >> + mdev_set_class(mdev, MDEV_CLASS_ID_VIRTIO); > >> + mdev->virtio_ops = virtio_ops; > >> +} > >> +EXPORT_SYMBOL(mdev_set_virtio_ops); > >> + > >> +/* Get the virtio device ops for the mdev device. */ > &...
2019 Oct 22
2
[PATCH v2] vhost: introduce mdev based hardware backend
...9,18 @@ void mdev_set_virtio_ops(struct mdev_device *mdev, } EXPORT_SYMBOL(mdev_set_virtio_ops); +/* Specify the vhost device ops for the mdev device, this + * must be called during create() callback for vhost mdev device. + */ +void mdev_set_vhost_ops(struct mdev_device *mdev, + const struct virtio_mdev_device_ops *vhost_ops) +{ + WARN_ON(mdev->class_id); + mdev->class_id = MDEV_CLASS_ID_VHOST; + mdev->device_ops = vhost_ops; +} +EXPORT_SYMBOL(mdev_set_vhost_ops); + const void *mdev_get_dev_ops(struct mdev_device *mdev) { return mdev->device_ops; diff --git a/drivers/vhost/Kconfig b/drivers/...
2019 Oct 22
2
[PATCH v2] vhost: introduce mdev based hardware backend
...9,18 @@ void mdev_set_virtio_ops(struct mdev_device *mdev, } EXPORT_SYMBOL(mdev_set_virtio_ops); +/* Specify the vhost device ops for the mdev device, this + * must be called during create() callback for vhost mdev device. + */ +void mdev_set_vhost_ops(struct mdev_device *mdev, + const struct virtio_mdev_device_ops *vhost_ops) +{ + WARN_ON(mdev->class_id); + mdev->class_id = MDEV_CLASS_ID_VHOST; + mdev->device_ops = vhost_ops; +} +EXPORT_SYMBOL(mdev_set_vhost_ops); + const void *mdev_get_dev_ops(struct mdev_device *mdev) { return mdev->device_ops; diff --git a/drivers/vhost/Kconfig b/drivers/...
2019 Oct 23
0
[PATCH V5 4/6] mdev: introduce virtio device and its device ops
..._device_ops *mdev_get_vfio_ops(struct mdev_device *mdev) } EXPORT_SYMBOL(mdev_get_vfio_ops); +/* Specify the virtio device ops for the mdev device, this + * must be called during create() callback for virtio mdev device. + */ +void mdev_set_virtio_ops(struct mdev_device *mdev, + const struct virtio_mdev_device_ops *virtio_ops) +{ + mdev_set_class(mdev, MDEV_CLASS_ID_VIRTIO); + mdev->virtio_ops = virtio_ops; +} +EXPORT_SYMBOL(mdev_set_virtio_ops); + +/* Get the virtio device ops for the mdev device. */ +const struct virtio_mdev_device_ops * +mdev_get_virtio_ops(struct mdev_device *mdev) +{ + WARN_ON(mdev-...
2019 Oct 24
0
[PATCH V5 4/6] mdev: introduce virtio device and its device ops
...gt; EXPORT_SYMBOL(mdev_get_vfio_ops); >> >> +/* Specify the virtio device ops for the mdev device, this >> + * must be called during create() callback for virtio mdev device. >> + */ >> +void mdev_set_virtio_ops(struct mdev_device *mdev, >> + const struct virtio_mdev_device_ops *virtio_ops) >> +{ >> + mdev_set_class(mdev, MDEV_CLASS_ID_VIRTIO); >> + mdev->virtio_ops = virtio_ops; >> +} >> +EXPORT_SYMBOL(mdev_set_virtio_ops); >> + >> +/* Get the virtio device ops for the mdev device. */ >> +const struct virtio_mdev_device...
2019 Oct 22
0
[PATCH v2] vhost: introduce mdev based hardware backend
...v_device *mdev, > } > EXPORT_SYMBOL(mdev_set_virtio_ops); > > +/* Specify the vhost device ops for the mdev device, this > + * must be called during create() callback for vhost mdev device. > + */ > +void mdev_set_vhost_ops(struct mdev_device *mdev, > + const struct virtio_mdev_device_ops *vhost_ops) > +{ > + WARN_ON(mdev->class_id); > + mdev->class_id = MDEV_CLASS_ID_VHOST; > + mdev->device_ops = vhost_ops; > +} > +EXPORT_SYMBOL(mdev_set_vhost_ops); > + > const void *mdev_get_dev_ops(struct mdev_device *mdev) > { > return mdev->devi...
2019 Oct 23
2
[PATCH v2] vhost: introduce mdev based hardware backend
...} > > EXPORT_SYMBOL(mdev_set_virtio_ops); > > +/* Specify the vhost device ops for the mdev device, this > > + * must be called during create() callback for vhost mdev device. > > + */ > > +void mdev_set_vhost_ops(struct mdev_device *mdev, > > + const struct virtio_mdev_device_ops *vhost_ops) > > +{ > > + WARN_ON(mdev->class_id); > > + mdev->class_id = MDEV_CLASS_ID_VHOST; > > + mdev->device_ops = vhost_ops; > > +} > > +EXPORT_SYMBOL(mdev_set_vhost_ops); > > + > > const void *mdev_get_dev_ops(struct mdev_device *mde...
2019 Oct 23
2
[PATCH v2] vhost: introduce mdev based hardware backend
...} > > EXPORT_SYMBOL(mdev_set_virtio_ops); > > +/* Specify the vhost device ops for the mdev device, this > > + * must be called during create() callback for vhost mdev device. > > + */ > > +void mdev_set_vhost_ops(struct mdev_device *mdev, > > + const struct virtio_mdev_device_ops *vhost_ops) > > +{ > > + WARN_ON(mdev->class_id); > > + mdev->class_id = MDEV_CLASS_ID_VHOST; > > + mdev->device_ops = vhost_ops; > > +} > > +EXPORT_SYMBOL(mdev_set_vhost_ops); > > + > > const void *mdev_get_dev_ops(struct mdev_device *mde...
2019 Sep 26
6
[PATCH] vhost: introduce mdev based hardware backend
...e lock is to protect this structure. */ + struct mutex mutex; + struct vhost_dev dev; + struct vhost_virtqueue *vqs; + int nvqs; + u64 state; + u64 features; + u64 acked_features; + bool opened; + struct mdev_device *mdev; +}; + +static u8 mdev_get_status(struct mdev_device *mdev) +{ + const struct virtio_mdev_device_ops *ops = mdev_get_dev_ops(mdev); + + return ops->get_status(mdev); +} + +static void mdev_set_status(struct mdev_device *mdev, u8 status) +{ + const struct virtio_mdev_device_ops *ops = mdev_get_dev_ops(mdev); + + return ops->set_status(mdev, status); +} + +static void mdev_add_status(struct m...
2019 Sep 26
6
[PATCH] vhost: introduce mdev based hardware backend
...e lock is to protect this structure. */ + struct mutex mutex; + struct vhost_dev dev; + struct vhost_virtqueue *vqs; + int nvqs; + u64 state; + u64 features; + u64 acked_features; + bool opened; + struct mdev_device *mdev; +}; + +static u8 mdev_get_status(struct mdev_device *mdev) +{ + const struct virtio_mdev_device_ops *ops = mdev_get_dev_ops(mdev); + + return ops->get_status(mdev); +} + +static void mdev_set_status(struct mdev_device *mdev, u8 status) +{ + const struct virtio_mdev_device_ops *ops = mdev_get_dev_ops(mdev); + + return ops->set_status(mdev, status); +} + +static void mdev_add_status(struct m...