search for: mdev_device

Displaying 20 results from an estimated 215 matches for "mdev_device".

2019 Oct 18
1
[PATCH V4 4/6] mdev: introduce virtio device and its device ops
...feature of virtio mdev device > + * @mdev: mediated device > + * Returns the mdev features (API) support by > + * the device. > + * @get_generation: Get device generaton > + * @mdev: mediated device > + * Returns u32: device generation > + */ > +struct virtio_mdev_device_ops { > + /* Virtqueue ops */ > + int (*set_vq_address)(struct mdev_device *mdev, > + u16 idx, u64 desc_area, u64 driver_area, > + u64 device_area); > + void (*set_vq_num)(struct mdev_device *mdev, u16 idx, u32 num); > + void (*kick_vq)(struct mdev_device *mdev, u1...
2019 Oct 23
2
[PATCH V5 4/6] mdev: introduce virtio device and its device ops
...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/mdev/mdev_core.c > @@ -76,6 +76,26 @@ const struct vfio_mdev_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_devi...
2019 Oct 23
2
[PATCH V5 4/6] mdev: introduce virtio device and its device ops
...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/mdev/mdev_core.c > @@ -76,6 +76,26 @@ const struct vfio_mdev_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_devi...
2019 Nov 04
2
[PATCH V7 4/6] mdev: introduce virtio device and its device ops
....h > > diff --git a/drivers/vfio/mdev/mdev_core.c b/drivers/vfio/mdev/mdev_core.c > index 8d579d7ed82f..95ee4126ff9c 100644 > --- a/drivers/vfio/mdev/mdev_core.c > +++ b/drivers/vfio/mdev/mdev_core.c > @@ -76,6 +76,26 @@ const struct mdev_vfio_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. > + */ Comment style. > +void mdev_set_virtio_ops(struct mdev_device *mdev, > + const...
2019 Nov 04
2
[PATCH V7 4/6] mdev: introduce virtio device and its device ops
....h > > diff --git a/drivers/vfio/mdev/mdev_core.c b/drivers/vfio/mdev/mdev_core.c > index 8d579d7ed82f..95ee4126ff9c 100644 > --- a/drivers/vfio/mdev/mdev_core.c > +++ b/drivers/vfio/mdev/mdev_core.c > @@ -76,6 +76,26 @@ const struct mdev_vfio_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. > + */ Comment style. > +void mdev_set_virtio_ops(struct mdev_device *mdev, > + const...
2019 Sep 25
3
[PATCH V2 6/8] mdev: introduce virtio device and its device ops
...; 2 files changed, 147 insertions(+) > create mode 100644 include/linux/virtio_mdev.h > > diff --git a/include/linux/mdev.h b/include/linux/mdev.h > index 3414307311f1..73ac27b3b868 100644 > --- a/include/linux/mdev.h > +++ b/include/linux/mdev.h > @@ -126,6 +126,8 @@ struct mdev_device *mdev_from_dev(struct device > *dev); > > enum { > MDEV_ID_VFIO = 1, > + MDEV_ID_VIRTIO = 2, > + MDEV_ID_VHOST = 3, > /* New entries must be added here */ > }; > > diff --git a/include/linux/virtio_mdev.h b/include/linux/virtio_mdev.h > new file mode 100644...
2019 Sep 25
3
[PATCH V2 6/8] mdev: introduce virtio device and its device ops
...; 2 files changed, 147 insertions(+) > create mode 100644 include/linux/virtio_mdev.h > > diff --git a/include/linux/mdev.h b/include/linux/mdev.h > index 3414307311f1..73ac27b3b868 100644 > --- a/include/linux/mdev.h > +++ b/include/linux/mdev.h > @@ -126,6 +126,8 @@ struct mdev_device *mdev_from_dev(struct device > *dev); > > enum { > MDEV_ID_VFIO = 1, > + MDEV_ID_VIRTIO = 2, > + MDEV_ID_VHOST = 3, > /* New entries must be added here */ > }; > > diff --git a/include/linux/virtio_mdev.h b/include/linux/virtio_mdev.h > new file mode 100644...
2019 Oct 17
12
[PATCH V4 0/6] mdev based hardware virtio offloading support
...vent into patch of introducing class id - tweak the words in the docs per Cornelia suggestion - tie class_id and device ops through class specific initialization routine like mdev_set_vfio_ops() - typos fixes in the docs of virtio-mdev callbacks - document the usage of virtqueues in struct virtio_mdev_device - remove the useless vqs array in struct virtio_mdev_device - rename MDEV_ID_XXX to MDEV_CLASS_ID_XXX Changes from V2: - fail when class_id is not specified - drop the vringh patch - match the doc to the code - tweak the commit log - move device_ops from parent to mdev device - remove the unused...
2019 Oct 17
12
[PATCH V4 0/6] mdev based hardware virtio offloading support
...vent into patch of introducing class id - tweak the words in the docs per Cornelia suggestion - tie class_id and device ops through class specific initialization routine like mdev_set_vfio_ops() - typos fixes in the docs of virtio-mdev callbacks - document the usage of virtqueues in struct virtio_mdev_device - remove the useless vqs array in struct virtio_mdev_device - rename MDEV_ID_XXX to MDEV_CLASS_ID_XXX Changes from V2: - fail when class_id is not specified - drop the vringh patch - match the doc to the code - tweak the commit log - move device_ops from parent to mdev device - remove the unused...
2019 Oct 17
0
[PATCH V4 4/6] mdev: introduce virtio device and its device ops
...insertions(+) create mode 100644 include/linux/virtio_mdev.h diff --git a/drivers/vfio/mdev/mdev_core.c b/drivers/vfio/mdev/mdev_core.c index d0f3113c8071..5834f6b7c7a5 100644 --- a/drivers/vfio/mdev/mdev_core.c +++ b/drivers/vfio/mdev/mdev_core.c @@ -57,6 +57,18 @@ void mdev_set_vfio_ops(struct mdev_device *mdev, } EXPORT_SYMBOL(mdev_set_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) +{ + BUG_ON(m...
2019 Nov 04
0
[PATCH V7 4/6] mdev: introduce virtio device and its device ops
...include/linux/mdev_virtio_ops.h diff --git a/drivers/vfio/mdev/mdev_core.c b/drivers/vfio/mdev/mdev_core.c index 8d579d7ed82f..95ee4126ff9c 100644 --- a/drivers/vfio/mdev/mdev_core.c +++ b/drivers/vfio/mdev/mdev_core.c @@ -76,6 +76,26 @@ const struct mdev_vfio_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 mdev_virtio_device_ops *virtio_ops) +{ + mdev_set...
2019 Oct 23
0
[PATCH V5 4/6] mdev: introduce virtio device and its device ops
...ged, 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/mdev/mdev_core.c @@ -76,6 +76,26 @@ const struct vfio_mdev_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_...
2019 Nov 05
0
[PATCH V8 4/6] mdev: introduce virtio device and its device ops
...include/linux/mdev_virtio_ops.h diff --git a/drivers/vfio/mdev/mdev_core.c b/drivers/vfio/mdev/mdev_core.c index 4e70f19ac145..c58253404ed5 100644 --- a/drivers/vfio/mdev/mdev_core.c +++ b/drivers/vfio/mdev/mdev_core.c @@ -78,6 +78,27 @@ const struct mdev_vfio_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 mdev_virtio_device_ops *virtio_ops) +{ + mdev...
2019 Sep 24
3
[PATCH V2 5/8] mdev: introduce device specific ops
...n 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 callback to be used by > vfio-mdev and virtio-mdev. > > Signed-off-by: Jason Wang <jasowang at redhat.com> > --- > .../driver-api/vfio-mediated-device.rst | 4 +- > MAINTAINERS | 1 + &gt...
2019 Sep 24
3
[PATCH V2 5/8] mdev: introduce device specific ops
...n 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 callback to be used by > vfio-mdev and virtio-mdev. > > Signed-off-by: Jason Wang <jasowang at redhat.com> > --- > .../driver-api/vfio-mediated-device.rst | 4 +- > MAINTAINERS | 1 + &gt...
2019 Oct 17
1
[PATCH V4 4/6] mdev: introduce virtio device and its device ops
...0644 include/linux/virtio_mdev.h > > diff --git a/drivers/vfio/mdev/mdev_core.c b/drivers/vfio/mdev/mdev_core.c > index d0f3113c8071..5834f6b7c7a5 100644 > --- a/drivers/vfio/mdev/mdev_core.c > +++ b/drivers/vfio/mdev/mdev_core.c > @@ -57,6 +57,18 @@ void mdev_set_vfio_ops(struct mdev_device *mdev, > } > EXPORT_SYMBOL(mdev_set_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_md...
2019 Nov 06
0
[PATCH V9 4/6] mdev: introduce virtio device and its device ops
...n" <mst at redhat.com> diff --git a/drivers/vfio/mdev/mdev_core.c b/drivers/vfio/mdev/mdev_core.c index 4e70f19ac145..c58253404ed5 100644 --- a/drivers/vfio/mdev/mdev_core.c +++ b/drivers/vfio/mdev/mdev_core.c @@ -78,6 +78,27 @@ const struct mdev_vfio_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 mdev_virtio_device_ops *virtio_ops) +{ + mdev...
2019 Nov 05
1
[PATCH V8 4/6] mdev: introduce virtio device and its device ops
....h > > diff --git a/drivers/vfio/mdev/mdev_core.c b/drivers/vfio/mdev/mdev_core.c > index 4e70f19ac145..c58253404ed5 100644 > --- a/drivers/vfio/mdev/mdev_core.c > +++ b/drivers/vfio/mdev/mdev_core.c > @@ -78,6 +78,27 @@ const struct mdev_vfio_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...
2019 Nov 04
9
[PATCH V7 0/6] mdev based hardware virtio offloading support
...que name for id_table - move get_mdev_features() to be the first member of virtio_device_ops and more comments for it - typo fixes for the comments above virtio_mdev_ops Changes from V4: - keep mdev_set_class() for the device that doesn't use device ops - use union for device ops pointer in mdev_device - 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...
2019 Nov 05
1
[PATCH V7 4/6] mdev: introduce virtio device and its device ops
...fio/mdev/mdev_core.c b/drivers/vfio/mdev/mdev_core.c > >> index 8d579d7ed82f..95ee4126ff9c 100644 > >> --- a/drivers/vfio/mdev/mdev_core.c > >> +++ b/drivers/vfio/mdev/mdev_core.c > >> @@ -76,6 +76,26 @@ const struct mdev_vfio_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. > >> + */ > > Comment style. &gt...