search for: mdev_class_id_vhost

Displaying 20 results from an estimated 38 matches for "mdev_class_id_vhost".

2019 Oct 31
2
[PATCH v4] 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_device_ops * +mdev_get_vhost_ops(struct mdev_device *mdev) +{ + WARN_ON(mdev->class_id != MDEV_CLASS_ID_VHOST); + return mdev->vhost_ops;...
2019 Oct 31
2
[PATCH v4] 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_device_ops * +mdev_get_vhost_ops(struct mdev_device *mdev) +{ + WARN_ON(mdev->class_id != MDEV_CLASS_ID_VHOST); + return mdev->vhost_ops;...
2019 Oct 29
2
[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_device_ops * +mdev_get_vhost_ops(struct mdev_device *mdev) +{ + WARN_ON(mdev->class_id != MDEV_CLASS_ID_VHOST); + return mdev->vhost_ops;...
2019 Oct 29
2
[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_device_ops * +mdev_get_vhost_ops(struct mdev_device *mdev) +{ + WARN_ON(mdev->class_id != MDEV_CLASS_ID_VHOST); + return mdev->vhost_ops;...
2019 Nov 05
4
[PATCH v5] vhost: introduce mdev based hardware backend
...PORT_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 mdev_virtio_device_ops *vhost_ops) +{ + mdev_set_class(mdev, MDEV_CLASS_ID_VHOST); + mdev->virtio_ops = vhost_ops; +} +EXPORT_SYMBOL(mdev_set_vhost_ops); + +/* Get the vhost device ops for the mdev device. */ +const struct mdev_virtio_device_ops * +mdev_get_vhost_ops(struct mdev_device *mdev) +{ + WARN_ON(mdev->class_id != MDEV_CLASS_ID_VHOST); + return mdev->virtio_op...
2019 Nov 05
4
[PATCH v5] vhost: introduce mdev based hardware backend
...PORT_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 mdev_virtio_device_ops *vhost_ops) +{ + mdev_set_class(mdev, MDEV_CLASS_ID_VHOST); + mdev->virtio_ops = vhost_ops; +} +EXPORT_SYMBOL(mdev_set_vhost_ops); + +/* Get the vhost device ops for the mdev device. */ +const struct mdev_virtio_device_ops * +mdev_get_vhost_ops(struct mdev_device *mdev) +{ + WARN_ON(mdev->class_id != MDEV_CLASS_ID_VHOST); + return mdev->virtio_op...
2019 Nov 01
0
[PATCH v4] vhost: introduce mdev based hardware backend
...; > +/* 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->class_id != MDEV_...
2019 Nov 07
2
[PATCH v6] vhost: introduce mdev based hardware backend
...PORT_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 mdev_virtio_device_ops *vhost_ops) +{ + mdev_set_class(mdev, MDEV_CLASS_ID_VHOST); + mdev->virtio_ops = vhost_ops; +} +EXPORT_SYMBOL(mdev_set_vhost_ops); + +/* Get the vhost device ops for the mdev device. */ +const struct mdev_virtio_device_ops * +mdev_get_vhost_ops(struct mdev_device *mdev) +{ + WARN_ON(mdev->class_id != MDEV_CLASS_ID_VHOST); + return mdev->virtio_op...
2019 Nov 06
2
[PATCH v5] vhost: introduce mdev based hardware backend
...t 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 mdev_virtio_device_ops *vhost_ops) > > +{ > > + mdev_set_class(mdev, MDEV_CLASS_ID_VHOST); > > + mdev->virtio_ops = vhost_ops; > > +} > > +EXPORT_SYMBOL(mdev_set_vhost_ops); > > + > > +/* Get the vhost device ops for the mdev device. */ > > +const struct mdev_virtio_device_ops * > > +mdev_get_vhost_ops(struct mdev_device *mdev) > > +{...
2019 Nov 06
2
[PATCH v5] vhost: introduce mdev based hardware backend
...t 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 mdev_virtio_device_ops *vhost_ops) > > +{ > > + mdev_set_class(mdev, MDEV_CLASS_ID_VHOST); > > + mdev->virtio_ops = vhost_ops; > > +} > > +EXPORT_SYMBOL(mdev_set_vhost_ops); > > + > > +/* Get the vhost device ops for the mdev device. */ > > +const struct mdev_virtio_device_ops * > > +mdev_get_vhost_ops(struct mdev_device *mdev) > > +{...
2019 Oct 30
1
[PATCH v3] vhost: introduce mdev based hardware backend
...t 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) > > +{ &...
2019 Oct 22
2
[PATCH v2] vhost: introduce mdev based hardware backend
...io_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/vhost/Kconfig index 3d03ccbd1adc..7b5c2f655af7 100644 --- a/drivers/vhost/Kconfig +++ b/...
2019 Oct 22
2
[PATCH v2] vhost: introduce mdev based hardware backend
...io_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/vhost/Kconfig index 3d03ccbd1adc..7b5c2f655af7 100644 --- a/drivers/vhost/Kconfig +++ b/...
2019 Oct 29
2
[RFC] vhost_mdev: add network control vq support
...ctrl; + /** * struct vfio_mdev_device_ops - Structure to be registered for each * mdev device to register the device for virtio/vhost drivers. @@ -151,6 +153,14 @@ struct virtio_mdev_device_ops { /* Mdev device ops */ u64 (*get_mdev_features)(struct mdev_device *mdev); + + /* Vhost-mdev (MDEV_CLASS_ID_VHOST) specific ops */ + union { + struct { + int (*ctrl)(struct mdev_device *mdev, + struct vhost_mdev_net_ctrl __user *ctrl); + } net; + }; }; void mdev_set_virtio_ops(struct mdev_device *mdev, diff --git a/include/uapi/linux/vhost.h b/include/uapi/linux/vhost.h index 061a2824a1b3..3693b...
2019 Oct 29
2
[RFC] vhost_mdev: add network control vq support
...ctrl; + /** * struct vfio_mdev_device_ops - Structure to be registered for each * mdev device to register the device for virtio/vhost drivers. @@ -151,6 +153,14 @@ struct virtio_mdev_device_ops { /* Mdev device ops */ u64 (*get_mdev_features)(struct mdev_device *mdev); + + /* Vhost-mdev (MDEV_CLASS_ID_VHOST) specific ops */ + union { + struct { + int (*ctrl)(struct mdev_device *mdev, + struct vhost_mdev_net_ctrl __user *ctrl); + } net; + }; }; void mdev_set_virtio_ops(struct mdev_device *mdev, diff --git a/include/uapi/linux/vhost.h b/include/uapi/linux/vhost.h index 061a2824a1b3..3693b...
2019 Nov 06
0
[PATCH v5] vhost: introduce mdev based hardware backend
...+/* > + * 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 mdev_virtio_device_ops *vhost_ops) > +{ > + mdev_set_class(mdev, MDEV_CLASS_ID_VHOST); > + mdev->virtio_ops = vhost_ops; > +} > +EXPORT_SYMBOL(mdev_set_vhost_ops); > + > +/* Get the vhost device ops for the mdev device. */ > +const struct mdev_virtio_device_ops * > +mdev_get_vhost_ops(struct mdev_device *mdev) > +{ > + WARN_ON(mdev->class_id != MDEV...
2019 Nov 06
2
[PATCH v5] vhost: introduce mdev based hardware backend
...;>>> + * must be called during create() callback for vhost mdev device. >>>> + */ >>>> +void mdev_set_vhost_ops(struct mdev_device *mdev, >>>> + const struct mdev_virtio_device_ops *vhost_ops) >>>> +{ >>>> + mdev_set_class(mdev, MDEV_CLASS_ID_VHOST); >>>> + mdev->virtio_ops = vhost_ops; >>>> +} >>>> +EXPORT_SYMBOL(mdev_set_vhost_ops); >>>> + >>>> +/* Get the vhost device ops for the mdev device. */ >>>> +const struct mdev_virtio_device_ops * >>>> +mdev_get_...
2019 Nov 06
2
[PATCH v5] vhost: introduce mdev based hardware backend
...;>>> + * must be called during create() callback for vhost mdev device. >>>> + */ >>>> +void mdev_set_vhost_ops(struct mdev_device *mdev, >>>> + const struct mdev_virtio_device_ops *vhost_ops) >>>> +{ >>>> + mdev_set_class(mdev, MDEV_CLASS_ID_VHOST); >>>> + mdev->virtio_ops = vhost_ops; >>>> +} >>>> +EXPORT_SYMBOL(mdev_set_vhost_ops); >>>> + >>>> +/* Get the vhost device ops for the mdev device. */ >>>> +const struct mdev_virtio_device_ops * >>>> +mdev_get_...
2019 Oct 30
0
[PATCH v3] vhost: introduce mdev based hardware backend
...t; > +/* 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->class_id != MDEV_...
2019 Nov 06
0
[PATCH v5] vhost: introduce mdev based hardware backend
...+/* > + * 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 mdev_virtio_device_ops *vhost_ops) > +{ > + mdev_set_class(mdev, MDEV_CLASS_ID_VHOST); > + mdev->virtio_ops = vhost_ops; > +} > +EXPORT_SYMBOL(mdev_set_vhost_ops); > + > +/* Get the vhost device ops for the mdev device. */ > +const struct mdev_virtio_device_ops * > +mdev_get_vhost_ops(struct mdev_device *mdev) > +{ > + WARN_ON(mdev->class_id != MDEV...