Displaying 20 results from an estimated 110 matches for "virtio_op".
Did you mean:
virtio_ops
2019 Oct 17
2
[PATCH V3 4/7] mdev: introduce device specific ops
...ice *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
...ice *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
2
[PATCH V5 4/6] mdev: introduce virtio device and its device ops
...nst 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_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 23
2
[PATCH V5 4/6] mdev: introduce virtio device and its device ops
...nst 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_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 24
1
[PATCH V5 4/6] mdev: introduce virtio device and its device ops
...ice *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);
> >...
2019 Nov 04
2
[PATCH V7 4/6] mdev: introduce virtio device and its device ops
...orts
> 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/mdev_virtio_ops.h | 166 +++++++++++++++++++++++++++++++
> 4 files changed, 194 insertions(+)
> create mode 100644 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...
2019 Nov 04
2
[PATCH V7 4/6] mdev: introduce virtio device and its device ops
...orts
> 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/mdev_virtio_ops.h | 166 +++++++++++++++++++++++++++++++
> 4 files changed, 194 insertions(+)
> create mode 100644 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...
2019 Nov 05
0
[PATCH V8 4/6] mdev: introduce virtio device and its device ops
...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 | 21 +++++
drivers/vfio/mdev/mdev_private.h | 2 +
include/linux/mdev.h | 6 ++
include/linux/mdev_virtio_ops.h | 149 +++++++++++++++++++++++++++++++
4 files changed, 178 insertions(+)
create mode 100644 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/vfi...
2019 Oct 23
0
[PATCH V5 4/6] mdev: introduce virtio device and its device ops
...v/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_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...
2019 Nov 06
0
[PATCH V9 4/6] mdev: introduce virtio device and its device ops
...s
virtio transport for kernel virtio driver.
Signed-off-by: Jason Wang <jasowang at redhat.com>
---
MAINTAINERS | 1 +
drivers/vfio/mdev/mdev_core.c | 21 +++++
drivers/vfio/mdev/mdev_private.h | 2 +
include/linux/mdev.h | 6 ++
include/linux/mdev_virtio_ops.h | 147 +++++++++++++++++++++++++++++++
5 files changed, 177 insertions(+)
create mode 100644 include/linux/mdev_virtio_ops.h
diff --git a/MAINTAINERS b/MAINTAINERS
index f661d13344d6..4997957443df 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -17248,6 +17248,7 @@ F: include/linux/virtio*.h
F...
2019 Oct 16
0
[PATCH V3 4/7] mdev: introduce device specific ops
...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 match cal...
2019 Nov 05
1
[PATCH V8 4/6] mdev: introduce virtio device and its device ops
...rts
> virtio transport for kernel virtio driver.
>
> Signed-off-by: Jason Wang <jasowang at redhat.com>
> ---
> drivers/vfio/mdev/mdev_core.c | 21 +++++
> drivers/vfio/mdev/mdev_private.h | 2 +
> include/linux/mdev.h | 6 ++
> include/linux/mdev_virtio_ops.h | 149 +++++++++++++++++++++++++++++++
> 4 files changed, 178 insertions(+)
> create mode 100644 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...
2011 Nov 15
2
[RFC] kvm tools: Add support for virtio-mmio
...er(vmmio->kvm, vmmio->irq);
+
+ return 0;
+}
+
+static void virtio_mmio__device_specific(u64 addr, u8 *data, u32 len, u8 is_write,
+ struct virtio_trans *vtrans)
+{
+ struct virtio_mmio *vmmio = vtrans->virtio;
+ u32 i;
+
+ for (i = 0; i < len; i++) {
+ if (is_write)
+ vtrans->virtio_ops->set_config(vmmio->kvm, vmmio->dev,
+ *(u8 *)data + i, addr + i);
+ else
+ data[i] =
+ vtrans->virtio_ops->get_config(vmmio->kvm, vmmio->dev, addr + i);
+ }
+}
+
+static void virtio_mmio__config_out(u64 addr, void *data, u32 len, struct virtio_trans *vtrans)
+{
+ s...
2011 Nov 15
2
[RFC] kvm tools: Add support for virtio-mmio
...er(vmmio->kvm, vmmio->irq);
+
+ return 0;
+}
+
+static void virtio_mmio__device_specific(u64 addr, u8 *data, u32 len, u8 is_write,
+ struct virtio_trans *vtrans)
+{
+ struct virtio_mmio *vmmio = vtrans->virtio;
+ u32 i;
+
+ for (i = 0; i < len; i++) {
+ if (is_write)
+ vtrans->virtio_ops->set_config(vmmio->kvm, vmmio->dev,
+ *(u8 *)data + i, addr + i);
+ else
+ data[i] =
+ vtrans->virtio_ops->get_config(vmmio->kvm, vmmio->dev, addr + i);
+ }
+}
+
+static void virtio_mmio__config_out(u64 addr, void *data, u32 len, struct virtio_trans *vtrans)
+{
+ s...
2019 Nov 04
0
[PATCH V7 4/6] mdev: introduce virtio device and its device ops
...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/mdev_virtio_ops.h | 166 +++++++++++++++++++++++++++++++
4 files changed, 194 insertions(+)
create mode 100644 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/vfi...
2019 Oct 24
0
[PATCH V5 4/6] mdev: introduce virtio device and its 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...
2019 Oct 17
0
[PATCH V3 4/7] mdev: introduce device specific ops
...> >>> void mdev_set_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 *md...
2019 Nov 05
1
[PATCH V7 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/mdev_virtio_ops.h | 166 +++++++++++++++++++++++++++++++
> >> 4 files changed, 194 insertions(+)
> >> create mode 100644 include/linux/mdev_virtio_ops.h
> >>
> >> diff --git a/drivers/vfio/mdev/mdev_core.c b/drivers/vfio/mdev/mdev_core.c
> >> index 8d579d7ed82f..95...
2019 Nov 05
0
[PATCH V7 4/6] mdev: introduce virtio device and its device ops
...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/mdev_virtio_ops.h | 166 +++++++++++++++++++++++++++++++
>> 4 files changed, 194 insertions(+)
>> create mode 100644 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
>>...
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