Displaying 20 results from an estimated 31 matches for "mdev_id_virtio".
2019 Sep 24
3
[PATCH V2 6/8] mdev: introduce virtio device and its device ops
...; 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,
MDEV_ID_VHOST isn't used yet here. Also, given the strong
interdependence between the class_id and the ops structure, we might
wand to define them in the same place. Thanks,
Alex
> /* New entries must be added here */
> };
>
> diff --git a/in...
2019 Oct 17
2
[PATCH V3 4/7] mdev: introduce device specific ops
...vice_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) {
>>> mdev->device_ops = virtio_ops;
>>> mdev->class_id = MDEV_ID_VHOST;
>>> }
>>>
>>> void mdev_se...
2019 Oct 17
2
[PATCH V3 4/7] mdev: introduce device specific ops
...vice_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) {
>>> mdev->device_ops = virtio_ops;
>>> mdev->class_id = MDEV_ID_VHOST;
>>> }
>>>
>>> void mdev_se...
2019 Sep 20
1
[RFC v4 0/3] vhost: introduce mdev based hardware backend
...posed in ...
> > ... https://lkml.org/lkml/2019/9/12/151 ...
>
>
> To clarify, this should be done through the id_table fields in
> vhost_mdev_driver, and it should claim it supports virtio-mdev device only:
>
>
> static struct mdev_class_id id_table[] = {
> ??? { MDEV_ID_VIRTIO },
> ??? { 0 },
> };
>
>
> static struct mdev_driver vhost_mdev_driver = {
> ??? ...
> ??? .id_table = id_table,
> }
In this way, both of virtio-mdev and vhost-mdev will try to
take this device. We may want a way to let vhost-mdev take this
device only when users explicit...
2019 Sep 25
3
[PATCH V2 6/8] mdev: introduce virtio device and its device ops
...ff --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
> index 000000000000..d1a40a739266
> --- /dev/null
> +++ b/include/linux/virtio_mdev.h
> @@ -0,...
2019 Sep 25
3
[PATCH V2 6/8] mdev: introduce virtio device and its device ops
...ff --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
> index 000000000000..d1a40a739266
> --- /dev/null
> +++ b/include/linux/virtio_mdev.h
> @@ -0,...
2019 Oct 17
0
[PATCH V3 4/7] mdev: introduce device specific ops
...gt; 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) {
> >>> mdev->device_ops = virtio_ops;
> >>> mdev->class_id = MDEV_ID_VHOST;
> >>> }
>...
2019 Sep 20
0
[RFC v4 0/3] vhost: introduce mdev based hardware backend
...>
> ... Check the mdev device_id proposed in ...
> ... https://lkml.org/lkml/2019/9/12/151 ...
To clarify, this should be done through the id_table fields in
vhost_mdev_driver, and it should claim it supports virtio-mdev device only:
static struct mdev_class_id id_table[] = {
??? { MDEV_ID_VIRTIO },
??? { 0 },
};
static struct mdev_driver vhost_mdev_driver = {
??? ...
??? .id_table = id_table,
}
>
> return vfio_add_group_dev(dev, &vfio_vhost_mdev_dev_ops, mdev);
And in vfio_vhost_mdev_ops, all its need is to just implement vhost-net
ioctl and translate them to virtio-md...
2019 Sep 25
2
[PATCH V2 6/8] mdev: introduce virtio device and its device ops
...ac27b3b868 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
> > > index 000000000000..d1a40a7392...
2019 Sep 25
2
[PATCH V2 6/8] mdev: introduce virtio device and its device ops
...ac27b3b868 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
> > > index 000000000000..d1a40a7392...
2019 Sep 19
3
[RFC v4 0/3] vhost: introduce mdev based hardware backend
On Thu, Sep 19, 2019 at 09:08:11PM +0800, Jason Wang wrote:
> On 2019/9/18 ??10:32, Michael S. Tsirkin wrote:
> > > > > So I have some questions:
> > > > >
> > > > > 1) Compared to method 2, what's the advantage of creating a new vhost char
> > > > > device? I guess it's for keep the API compatibility?
> > > > One
2019 Sep 19
3
[RFC v4 0/3] vhost: introduce mdev based hardware backend
On Thu, Sep 19, 2019 at 09:08:11PM +0800, Jason Wang wrote:
> On 2019/9/18 ??10:32, Michael S. Tsirkin wrote:
> > > > > So I have some questions:
> > > > >
> > > > > 1) Compared to method 2, what's the advantage of creating a new vhost char
> > > > > device? I guess it's for keep the API compatibility?
> > > > One
2019 Sep 30
0
[PATCH V2 6/8] mdev: introduce virtio device and its device ops
....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,
> >
> > MDEV_ID_VHOST isn't used yet here. Also, given the strong interdependence
> > between the class_id and the ops structure, we might wand to define them in
> > the same place. Thanks,
> >
>
> When mlx5_c...
2019 Sep 24
0
[PATCH V2 6/8] mdev: introduce virtio device and its device ops
...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
index 000000000000..d1a40a739266
--- /dev/null
+++ b/include/linux/virtio_mdev.h
@@ -0,0 +1,145 @@
+/* SPDX-License-Identifier: GPL-2.0-...
2019 Oct 11
0
[PATCH V3 5/7] mdev: introduce virtio device and its device ops
...mode 100644 include/linux/virtio_mdev.h
diff --git a/include/linux/mdev.h b/include/linux/mdev.h
index f491308674e5..298581e7ad45 100644
--- a/include/linux/mdev.h
+++ b/include/linux/mdev.h
@@ -124,6 +124,7 @@ struct mdev_device *mdev_from_dev(struct device *dev);
enum {
MDEV_ID_VFIO = 1,
+ MDEV_ID_VIRTIO = 2,
/* New entries must be added here */
};
diff --git a/include/linux/virtio_mdev.h b/include/linux/virtio_mdev.h
new file mode 100644
index 000000000000..b39c62534acc
--- /dev/null
+++ b/include/linux/virtio_mdev.h
@@ -0,0 +1,148 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * Virti...
2019 Oct 16
0
[PATCH V3 4/7] mdev: introduce device specific ops
...et_vfio_ops(struct mdev_device *mdev, 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)
{
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 Sep 26
0
[PATCH V2 6/8] mdev: introduce virtio device and its device ops
...>>>> --- 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
>>>> index 000000000...
2019 Sep 25
0
[PATCH V2 6/8] mdev: introduce virtio device and its device ops
...lude/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
>> index 000000000000..d1a40a739266
>> --- /dev/null
>> +++ b/in...
2019 Sep 26
1
[PATCH V2 6/8] mdev: introduce virtio device and its device ops
.....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
> >> index 000000000000..d1a40a739266
>...
2019 Oct 16
0
[PATCH V3 4/7] mdev: introduce device specific ops
...t; > 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) {
> > mdev->device_ops = virtio_ops;
> > mdev->class_id = MDEV_ID_VHOST;
> > }
> >
> > void mdev_set_vendor_ops(struct mdev_...