Displaying 14 results from an estimated 14 matches for "virtio_mdev_device_id".
2019 Sep 10
2
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...quot; string) - Read Only */
> > > +#define VIRTIO_MDEV_MAGIC_VALUE 0x000
> > > +
> > > +/* Virtio device version - Read Only */
> > > +#define VIRTIO_MDEV_VERSION 0x004
> > > +
> > > +/* Virtio device ID - Read Only */
> > > +#define VIRTIO_MDEV_DEVICE_ID 0x008
> > > +
> > > +/* Virtio vendor ID - Read Only */
> > > +#define VIRTIO_MDEV_VENDOR_ID 0x00c
> > > +
> > > +/* Bitmask of the features supported by the device (host)
> > > + * (32 bits per set) - Read Only */
> > > +#define VIRT...
2019 Sep 10
2
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...quot; string) - Read Only */
> > > +#define VIRTIO_MDEV_MAGIC_VALUE 0x000
> > > +
> > > +/* Virtio device version - Read Only */
> > > +#define VIRTIO_MDEV_VERSION 0x004
> > > +
> > > +/* Virtio device ID - Read Only */
> > > +#define VIRTIO_MDEV_DEVICE_ID 0x008
> > > +
> > > +/* Virtio vendor ID - Read Only */
> > > +#define VIRTIO_MDEV_VENDOR_ID 0x00c
> > > +
> > > +/* Bitmask of the features supported by the device (host)
> > > + * (32 bits per set) - Read Only */
> > > +#define VIRT...
2019 Sep 10
2
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...; + vm_dev->version = virtio_mdev_readl(mdev, VIRTIO_MDEV_VERSION);
> + if (vm_dev->version != 1) {
> + dev_err(dev, "Version %ld not supported!\n",
> + vm_dev->version);
> + return -ENXIO;
> + }
> +
> + vm_dev->vdev.id.device = virtio_mdev_readl(mdev, VIRTIO_MDEV_DEVICE_ID);
> + if (vm_dev->vdev.id.device == 0)
> + return -ENODEV;
> +
> + vm_dev->vdev.id.vendor = virtio_mdev_readl(mdev, VIRTIO_MDEV_VENDOR_ID);
> + rc = register_virtio_device(&vm_dev->vdev);
> + if (rc)
> + put_device(dev);
> +
> + dev_set_drvdata(dev, vm_dev)...
2019 Sep 10
2
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...; + vm_dev->version = virtio_mdev_readl(mdev, VIRTIO_MDEV_VERSION);
> + if (vm_dev->version != 1) {
> + dev_err(dev, "Version %ld not supported!\n",
> + vm_dev->version);
> + return -ENXIO;
> + }
> +
> + vm_dev->vdev.id.device = virtio_mdev_readl(mdev, VIRTIO_MDEV_DEVICE_ID);
> + if (vm_dev->vdev.id.device == 0)
> + return -ENODEV;
> +
> + vm_dev->vdev.id.vendor = virtio_mdev_readl(mdev, VIRTIO_MDEV_VENDOR_ID);
> + rc = register_virtio_device(&vm_dev->vdev);
> + if (rc)
> + put_device(dev);
> +
> + dev_set_drvdata(dev, vm_dev)...
2019 Sep 10
0
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...t; +
>> +/* Magic value ("virt" string) - Read Only */
>> +#define VIRTIO_MDEV_MAGIC_VALUE 0x000
>> +
>> +/* Virtio device version - Read Only */
>> +#define VIRTIO_MDEV_VERSION 0x004
>> +
>> +/* Virtio device ID - Read Only */
>> +#define VIRTIO_MDEV_DEVICE_ID 0x008
>> +
>> +/* Virtio vendor ID - Read Only */
>> +#define VIRTIO_MDEV_VENDOR_ID 0x00c
>> +
>> +/* Bitmask of the features supported by the device (host)
>> + * (32 bits per set) - Read Only */
>> +#define VIRTIO_MDEV_DEVICE_FEATURES 0x010
>> +
&...
2019 Sep 11
2
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...* Control registers
> + */
> +
> +/* Magic value ("virt" string) - Read Only */
> +#define VIRTIO_MDEV_MAGIC_VALUE 0x000
> +
> +/* Virtio device version - Read Only */
> +#define VIRTIO_MDEV_VERSION 0x004
> +
> +/* Virtio device ID - Read Only */
> +#define VIRTIO_MDEV_DEVICE_ID 0x008
> +
> +/* Virtio vendor ID - Read Only */
> +#define VIRTIO_MDEV_VENDOR_ID 0x00c
> +
> +/* Bitmask of the features supported by the device (host)
> + * (32 bits per set) - Read Only */
> +#define VIRTIO_MDEV_DEVICE_FEATURES 0x010
> +
> +/* Device (host) features s...
2019 Sep 11
2
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...* Control registers
> + */
> +
> +/* Magic value ("virt" string) - Read Only */
> +#define VIRTIO_MDEV_MAGIC_VALUE 0x000
> +
> +/* Virtio device version - Read Only */
> +#define VIRTIO_MDEV_VERSION 0x004
> +
> +/* Virtio device ID - Read Only */
> +#define VIRTIO_MDEV_DEVICE_ID 0x008
> +
> +/* Virtio vendor ID - Read Only */
> +#define VIRTIO_MDEV_VENDOR_ID 0x00c
> +
> +/* Bitmask of the features supported by the device (host)
> + * (32 bits per set) - Read Only */
> +#define VIRTIO_MDEV_DEVICE_FEATURES 0x010
> +
> +/* Device (host) features s...
2019 Sep 11
0
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...- Read Only */
>>>> +#define VIRTIO_MDEV_MAGIC_VALUE 0x000
>>>> +
>>>> +/* Virtio device version - Read Only */
>>>> +#define VIRTIO_MDEV_VERSION 0x004
>>>> +
>>>> +/* Virtio device ID - Read Only */
>>>> +#define VIRTIO_MDEV_DEVICE_ID 0x008
>>>> +
>>>> +/* Virtio vendor ID - Read Only */
>>>> +#define VIRTIO_MDEV_VENDOR_ID 0x00c
>>>> +
>>>> +/* Bitmask of the features supported by the device (host)
>>>> + * (32 bits per set) - Read Only */
>>>>...
2019 Sep 10
0
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...n_lock_init(&vm_dev->lock);
+
+ vm_dev->version = virtio_mdev_readl(mdev, VIRTIO_MDEV_VERSION);
+ if (vm_dev->version != 1) {
+ dev_err(dev, "Version %ld not supported!\n",
+ vm_dev->version);
+ return -ENXIO;
+ }
+
+ vm_dev->vdev.id.device = virtio_mdev_readl(mdev, VIRTIO_MDEV_DEVICE_ID);
+ if (vm_dev->vdev.id.device == 0)
+ return -ENODEV;
+
+ vm_dev->vdev.id.vendor = virtio_mdev_readl(mdev, VIRTIO_MDEV_VENDOR_ID);
+ rc = register_virtio_device(&vm_dev->vdev);
+ if (rc)
+ put_device(dev);
+
+ dev_set_drvdata(dev, vm_dev);
+
+ return rc;
+
+}
+
+static void virtio_m...
2019 Sep 11
1
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...MDEV_MAGIC_VALUE 0x000
> > > > > +
> > > > > +/* Virtio device version - Read Only */
> > > > > +#define VIRTIO_MDEV_VERSION 0x004
> > > > > +
> > > > > +/* Virtio device ID - Read Only */
> > > > > +#define VIRTIO_MDEV_DEVICE_ID 0x008
> > > > > +
> > > > > +/* Virtio vendor ID - Read Only */
> > > > > +#define VIRTIO_MDEV_VENDOR_ID 0x00c
> > > > > +
> > > > > +/* Bitmask of the features supported by the device (host)
> > > > > + * (...
2019 Sep 10
8
[RFC PATCH 0/4] mdev based hardware virtio offloading support
Hi all:
There are hardware that can do virtio datapath offloading while having
its own control path. This path tries to implement a mdev based
unified API to support using kernel virtio driver to drive those
devices. This is done by introducing a new mdev transport for virtio
(virtio_mdev) and register itself as a new kind of mdev driver. Then
it provides a unified way for kernel virtio driver to
2019 Sep 11
0
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...t; +
>> +/* Magic value ("virt" string) - Read Only */
>> +#define VIRTIO_MDEV_MAGIC_VALUE 0x000
>> +
>> +/* Virtio device version - Read Only */
>> +#define VIRTIO_MDEV_VERSION 0x004
>> +
>> +/* Virtio device ID - Read Only */
>> +#define VIRTIO_MDEV_DEVICE_ID 0x008
>> +
>> +/* Virtio vendor ID - Read Only */
>> +#define VIRTIO_MDEV_VENDOR_ID 0x00c
>> +
>> +/* Bitmask of the features supported by the device (host)
>> + * (32 bits per set) - Read Only */
>> +#define VIRTIO_MDEV_DEVICE_FEATURES 0x010
>> +
&...
2019 Sep 10
1
[RFC PATCH 4/4] docs: Sample driver to demonstrate how to implement virtio-mdev framework
...+ }
> +
> + queue_sel = mvnet->queue_sel;
> + vq = &mvnet->vqs[queue_sel];
> +
> + switch (pos) {
> + case VIRTIO_MDEV_MAGIC_VALUE:
> + *val = MVNET_MAGIC_VALUE;
> + break;
> + case VIRTIO_MDEV_VERSION:
> + *val = MVNET_VERSION;
> + break;
> + case VIRTIO_MDEV_DEVICE_ID:
> + *val = MVNET_DEVICE_ID;
> + break;
> + case VIRTIO_MDEV_VENDOR_ID:
> + *val = MVNET_VENDOR_ID;
> + break;
> + case VIRTIO_MDEV_DEVICE_FEATURES:
> + if (mvnet->device_features_sel)
> + *val = mvnet_features >> 32;
> + else
> + *val = mvnet_featur...
2019 Sep 10
0
[RFC PATCH 4/4] docs: Sample driver to demonstrate how to implement virtio-mdev framework
...ot;%s mvnet not found\n", __func__);
+ return -EINVAL;
+ }
+
+ queue_sel = mvnet->queue_sel;
+ vq = &mvnet->vqs[queue_sel];
+
+ switch (pos) {
+ case VIRTIO_MDEV_MAGIC_VALUE:
+ *val = MVNET_MAGIC_VALUE;
+ break;
+ case VIRTIO_MDEV_VERSION:
+ *val = MVNET_VERSION;
+ break;
+ case VIRTIO_MDEV_DEVICE_ID:
+ *val = MVNET_DEVICE_ID;
+ break;
+ case VIRTIO_MDEV_VENDOR_ID:
+ *val = MVNET_VENDOR_ID;
+ break;
+ case VIRTIO_MDEV_DEVICE_FEATURES:
+ if (mvnet->device_features_sel)
+ *val = mvnet_features >> 32;
+ else
+ *val = mvnet_features;
+ break;
+ case VIRTIO_MDEV_QUEUE_NUM_MAX:
+...