search for: virtio_mdev_ops

Displaying 20 results from an estimated 47 matches for "virtio_mdev_ops".

2019 Oct 29
2
[RFC] vhost_mdev: add network control vq support
...low parent drivers to handle the network control commands come from userspace. Signed-off-by: Tiwei Bie <tiwei.bie at intel.com> --- This patch depends on below patch: https://lkml.org/lkml/2019/10/29/335 drivers/vhost/mdev.c | 37 ++++++++++++++++++++++++++++++-- include/linux/virtio_mdev_ops.h | 10 +++++++++ include/uapi/linux/vhost.h | 7 ++++++ include/uapi/linux/vhost_types.h | 6 ++++++ 4 files changed, 58 insertions(+), 2 deletions(-) diff --git a/drivers/vhost/mdev.c b/drivers/vhost/mdev.c index 35b2fb33e686..c9b3eaa77405 100644 --- a/drivers/vhost/mdev.c +++ b/drivers...
2019 Oct 29
2
[RFC] vhost_mdev: add network control vq support
...low parent drivers to handle the network control commands come from userspace. Signed-off-by: Tiwei Bie <tiwei.bie at intel.com> --- This patch depends on below patch: https://lkml.org/lkml/2019/10/29/335 drivers/vhost/mdev.c | 37 ++++++++++++++++++++++++++++++-- include/linux/virtio_mdev_ops.h | 10 +++++++++ include/uapi/linux/vhost.h | 7 ++++++ include/uapi/linux/vhost_types.h | 6 ++++++ 4 files changed, 58 insertions(+), 2 deletions(-) diff --git a/drivers/vhost/mdev.c b/drivers/vhost/mdev.c index 35b2fb33e686..c9b3eaa77405 100644 --- a/drivers/vhost/mdev.c +++ b/drivers...
2019 Oct 23
2
[PATCH V5 4/6] mdev: introduce virtio device and its device ops
...supports > virtio transport for kernel virtio driver. > > Signed-off-by: Jason Wang <jasowang at redhat.com> > --- > drivers/vfio/mdev/mdev_core.c | 20 ++++ > drivers/vfio/mdev/mdev_private.h | 2 + > include/linux/mdev.h | 6 ++ > include/linux/virtio_mdev_ops.h | 159 +++++++++++++++++++++++++++++++ > 4 files changed, 187 insertions(+) > create mode 100644 include/linux/virtio_mdev_ops.h > > diff --git a/drivers/vfio/mdev/mdev_core.c b/drivers/vfio/mdev/mdev_core.c > index 555bd61d8c38..9b00c3513120 100644 > --- a/drivers/vfio/mdev/...
2019 Oct 23
2
[PATCH V5 4/6] mdev: introduce virtio device and its device ops
...supports > virtio transport for kernel virtio driver. > > Signed-off-by: Jason Wang <jasowang at redhat.com> > --- > drivers/vfio/mdev/mdev_core.c | 20 ++++ > drivers/vfio/mdev/mdev_private.h | 2 + > include/linux/mdev.h | 6 ++ > include/linux/virtio_mdev_ops.h | 159 +++++++++++++++++++++++++++++++ > 4 files changed, 187 insertions(+) > create mode 100644 include/linux/virtio_mdev_ops.h > > diff --git a/drivers/vfio/mdev/mdev_core.c b/drivers/vfio/mdev/mdev_core.c > index 555bd61d8c38..9b00c3513120 100644 > --- a/drivers/vfio/mdev/...
2019 Oct 29
0
[RFC] vhost_mdev: add network control vq support
...serspace driver but not kernel driver. > > Signed-off-by: Tiwei Bie <tiwei.bie at intel.com> > --- > This patch depends on below patch: > https://lkml.org/lkml/2019/10/29/335 > > drivers/vhost/mdev.c | 37 ++++++++++++++++++++++++++++++-- > include/linux/virtio_mdev_ops.h | 10 +++++++++ > include/uapi/linux/vhost.h | 7 ++++++ > include/uapi/linux/vhost_types.h | 6 ++++++ > 4 files changed, 58 insertions(+), 2 deletions(-) > > diff --git a/drivers/vhost/mdev.c b/drivers/vhost/mdev.c > index 35b2fb33e686..c9b3eaa77405 100644 > --- a/...
2019 Oct 24
1
[PATCH V5 4/6] mdev: introduce virtio device and its device ops
...;> > >> Signed-off-by: Jason Wang <jasowang at redhat.com> > >> --- > >> drivers/vfio/mdev/mdev_core.c | 20 ++++ > >> drivers/vfio/mdev/mdev_private.h | 2 + > >> include/linux/mdev.h | 6 ++ > >> include/linux/virtio_mdev_ops.h | 159 +++++++++++++++++++++++++++++++ > >> 4 files changed, 187 insertions(+) > >> create mode 100644 include/linux/virtio_mdev_ops.h > >> > >> diff --git a/drivers/vfio/mdev/mdev_core.c b/drivers/vfio/mdev/mdev_core.c > >> index 555bd61d8c38..9b0...
2019 Oct 17
2
[PATCH V3 4/7] mdev: introduce device specific ops
...truct(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); >>&...
2019 Oct 17
2
[PATCH V3 4/7] mdev: introduce device specific ops
...truct(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); >>&...
2019 Oct 23
0
[PATCH V5 4/6] mdev: introduce virtio device and its device ops
...ments basic support for mdev driver that supports virtio transport for kernel virtio driver. Signed-off-by: Jason Wang <jasowang at redhat.com> --- drivers/vfio/mdev/mdev_core.c | 20 ++++ drivers/vfio/mdev/mdev_private.h | 2 + include/linux/mdev.h | 6 ++ include/linux/virtio_mdev_ops.h | 159 +++++++++++++++++++++++++++++++ 4 files changed, 187 insertions(+) create mode 100644 include/linux/virtio_mdev_ops.h diff --git a/drivers/vfio/mdev/mdev_core.c b/drivers/vfio/mdev/mdev_core.c index 555bd61d8c38..9b00c3513120 100644 --- a/drivers/vfio/mdev/mdev_core.c +++ b/drivers/vfio...
2019 Oct 16
0
[PATCH V3 4/7] mdev: introduce device specific ops
...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.vfio_ops; > > } > > > > The...
2019 Oct 24
0
[PATCH V5 4/6] mdev: introduce virtio device and its device ops
...for kernel virtio driver. >> >> Signed-off-by: Jason Wang <jasowang at redhat.com> >> --- >> drivers/vfio/mdev/mdev_core.c | 20 ++++ >> drivers/vfio/mdev/mdev_private.h | 2 + >> include/linux/mdev.h | 6 ++ >> include/linux/virtio_mdev_ops.h | 159 +++++++++++++++++++++++++++++++ >> 4 files changed, 187 insertions(+) >> create mode 100644 include/linux/virtio_mdev_ops.h >> >> diff --git a/drivers/vfio/mdev/mdev_core.c b/drivers/vfio/mdev/mdev_core.c >> index 555bd61d8c38..9b00c3513120 100644 >>...
2019 Oct 30
2
[RFC] vhost_mdev: add network control vq support
...> > > > Signed-off-by: Tiwei Bie <tiwei.bie at intel.com> > > --- > > This patch depends on below patch: > > https://lkml.org/lkml/2019/10/29/335 > > > > drivers/vhost/mdev.c | 37 ++++++++++++++++++++++++++++++-- > > include/linux/virtio_mdev_ops.h | 10 +++++++++ > > include/uapi/linux/vhost.h | 7 ++++++ > > include/uapi/linux/vhost_types.h | 6 ++++++ > > 4 files changed, 58 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/vhost/mdev.c b/drivers/vhost/mdev.c > > index 35b2fb33e686..c...
2019 Oct 30
2
[RFC] vhost_mdev: add network control vq support
...> > > > Signed-off-by: Tiwei Bie <tiwei.bie at intel.com> > > --- > > This patch depends on below patch: > > https://lkml.org/lkml/2019/10/29/335 > > > > drivers/vhost/mdev.c | 37 ++++++++++++++++++++++++++++++-- > > include/linux/virtio_mdev_ops.h | 10 +++++++++ > > include/uapi/linux/vhost.h | 7 ++++++ > > include/uapi/linux/vhost_types.h | 6 ++++++ > > 4 files changed, 58 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/vhost/mdev.c b/drivers/vhost/mdev.c > > index 35b2fb33e686..c...
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
2019 Oct 16
0
[PATCH V3 4/7] mdev: introduce device specific ops
...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); > > > &...
2019 Oct 17
0
[PATCH V3 4/7] mdev: introduce device specific ops
...const struct > >>> vfio_mdev_ops *vfio_ops) { > >>> mdev->device_ops = vfio_ops; > >>> mdev->class_id = MDEV_ID_VFIO; > >>> } > >>> > >>> void mdev_set_virtio_ops(struct mdev_device *mdev, const struct > >>> virtio_mdev_ops *virtio_ops) { > >>> mdev->device_ops = virtio_ops; > >>> mdev->class_id = MDEV_ID_VIRTIO; > >>> } > >>> > >>> void mdev_set_vhost_ops(struct mdev_device *mdev, const struct > >>> virtio_mdev_ops *virtio_ops) { > &gt...
2019 Oct 23
10
[PATCH V5 0/6] mdev based hardware virtio offloading support
...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 WARN() when trying to set class_id when it has...
2019 Oct 23
10
[PATCH V5 0/6] mdev based hardware virtio offloading support
...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 WARN() when trying to set class_id when it has...
2019 Oct 30
0
[PATCH V6 6/6] docs: sample driver to demonstrate how to implement virtio-mdev framework
...lt;linux/sched.h> +#include <linux/wait.h> +#include <linux/uuid.h> +#include <linux/iommu.h> +#include <linux/sysfs.h> +#include <linux/file.h> +#include <linux/etherdevice.h> +#include <linux/mdev.h> +#include <linux/vringh.h> +#include <linux/virtio_mdev_ops.h> +#include <uapi/linux/virtio_config.h> +#include <uapi/linux/virtio_net.h> + +#define VERSION_STRING "0.1" +#define DRIVER_AUTHOR "Red Hat Corporation" + +#define MVNET_CLASS_NAME "mvnet" +#define MVNET_NAME "mvnet" + +/* + * Global...