Displaying 18 results from an estimated 18 matches for "virtio_mdev_queue_num_max".
2019 Sep 10
2
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...t; > > +#define VIRTIO_MDEV_DRIVER_FEATURES_SEL 0x024
> > > +
> > > +/* Queue selector - Write Only */
> > > +#define VIRTIO_MDEV_QUEUE_SEL 0x030
> > > +
> > > +/* Maximum size of the currently selected queue - Read Only */
> > > +#define VIRTIO_MDEV_QUEUE_NUM_MAX 0x034
> > > +
> > > +/* Queue size for the currently selected queue - Write Only */
> > > +#define VIRTIO_MDEV_QUEUE_NUM 0x038
> > > +
> > > +/* Ready bit for the currently selected queue - Read Write */
> > > +#define VIRTIO_MDEV_QUEUE_READY...
2019 Sep 10
2
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...t; > > +#define VIRTIO_MDEV_DRIVER_FEATURES_SEL 0x024
> > > +
> > > +/* Queue selector - Write Only */
> > > +#define VIRTIO_MDEV_QUEUE_SEL 0x030
> > > +
> > > +/* Maximum size of the currently selected queue - Read Only */
> > > +#define VIRTIO_MDEV_QUEUE_NUM_MAX 0x034
> > > +
> > > +/* Queue size for the currently selected queue - Write Only */
> > > +#define VIRTIO_MDEV_QUEUE_NUM 0x038
> > > +
> > > +/* Ready bit for the currently selected queue - Read Write */
> > > +#define VIRTIO_MDEV_QUEUE_READY...
2019 Sep 10
2
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...ENT;
> + goto error_available;
> + }
> +
> + /* Allocate and fill out our active queue description */
> + info = kmalloc(sizeof(*info), GFP_KERNEL);
> + if (!info) {
> + err = -ENOMEM;
> + goto error_kmalloc;
> + }
> +
> + num = virtio_mdev_readl(vm_dev->mdev, VIRTIO_MDEV_QUEUE_NUM_MAX);
> + if (num == 0) {
> + err = -ENOENT;
> + goto error_new_virtqueue;
> + }
> +
> + /* Create the vring */
> + align = virtio_mdev_readl(vm_dev->mdev, VIRTIO_MDEV_QUEUE_ALIGN);
> + vq = vring_create_virtqueue(index, num, align, vdev,
> + true, true, ctx,
>...
2019 Sep 10
2
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...ENT;
> + goto error_available;
> + }
> +
> + /* Allocate and fill out our active queue description */
> + info = kmalloc(sizeof(*info), GFP_KERNEL);
> + if (!info) {
> + err = -ENOMEM;
> + goto error_kmalloc;
> + }
> +
> + num = virtio_mdev_readl(vm_dev->mdev, VIRTIO_MDEV_QUEUE_NUM_MAX);
> + if (num == 0) {
> + err = -ENOENT;
> + goto error_new_virtqueue;
> + }
> +
> + /* Create the vring */
> + align = virtio_mdev_readl(vm_dev->mdev, VIRTIO_MDEV_QUEUE_ALIGN);
> + vq = vring_create_virtqueue(index, num, align, vdev,
> + true, true, ctx,
>...
2019 Sep 10
0
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...d features set selector - Write Only */
>> +#define VIRTIO_MDEV_DRIVER_FEATURES_SEL 0x024
>> +
>> +/* Queue selector - Write Only */
>> +#define VIRTIO_MDEV_QUEUE_SEL 0x030
>> +
>> +/* Maximum size of the currently selected queue - Read Only */
>> +#define VIRTIO_MDEV_QUEUE_NUM_MAX 0x034
>> +
>> +/* Queue size for the currently selected queue - Write Only */
>> +#define VIRTIO_MDEV_QUEUE_NUM 0x038
>> +
>> +/* Ready bit for the currently selected queue - Read Write */
>> +#define VIRTIO_MDEV_QUEUE_READY 0x044
> Is this same as started?...
2019 Sep 11
2
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...020
> +
> +/* Activated features set selector - Write Only */
> +#define VIRTIO_MDEV_DRIVER_FEATURES_SEL 0x024
> +
> +/* Queue selector - Write Only */
> +#define VIRTIO_MDEV_QUEUE_SEL 0x030
> +
> +/* Maximum size of the currently selected queue - Read Only */
> +#define VIRTIO_MDEV_QUEUE_NUM_MAX 0x034
> +
> +/* Queue size for the currently selected queue - Write Only */
> +#define VIRTIO_MDEV_QUEUE_NUM 0x038
> +
> +/* Ready bit for the currently selected queue - Read Write */
> +#define VIRTIO_MDEV_QUEUE_READY 0x044
> +
> +/* Alignment of virtqueue - Read Only */...
2019 Sep 11
2
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...020
> +
> +/* Activated features set selector - Write Only */
> +#define VIRTIO_MDEV_DRIVER_FEATURES_SEL 0x024
> +
> +/* Queue selector - Write Only */
> +#define VIRTIO_MDEV_QUEUE_SEL 0x030
> +
> +/* Maximum size of the currently selected queue - Read Only */
> +#define VIRTIO_MDEV_QUEUE_NUM_MAX 0x034
> +
> +/* Queue size for the currently selected queue - Write Only */
> +#define VIRTIO_MDEV_QUEUE_NUM 0x038
> +
> +/* Ready bit for the currently selected queue - Read Write */
> +#define VIRTIO_MDEV_QUEUE_READY 0x044
> +
> +/* Alignment of virtqueue - Read Only */...
2019 Sep 11
0
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...+#define VIRTIO_MDEV_DRIVER_FEATURES_SEL 0x024
>>>> +
>>>> +/* Queue selector - Write Only */
>>>> +#define VIRTIO_MDEV_QUEUE_SEL 0x030
>>>> +
>>>> +/* Maximum size of the currently selected queue - Read Only */
>>>> +#define VIRTIO_MDEV_QUEUE_NUM_MAX 0x034
>>>> +
>>>> +/* Queue size for the currently selected queue - Write Only */
>>>> +#define VIRTIO_MDEV_QUEUE_NUM 0x038
>>>> +
>>>> +/* Ready bit for the currently selected queue - Read Write */
>>>> +#define VIRTIO_MDEV_Q...
2019 Sep 10
0
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...dev->mdev, VIRTIO_MDEV_QUEUE_READY)) {
+ err = -ENOENT;
+ goto error_available;
+ }
+
+ /* Allocate and fill out our active queue description */
+ info = kmalloc(sizeof(*info), GFP_KERNEL);
+ if (!info) {
+ err = -ENOMEM;
+ goto error_kmalloc;
+ }
+
+ num = virtio_mdev_readl(vm_dev->mdev, VIRTIO_MDEV_QUEUE_NUM_MAX);
+ if (num == 0) {
+ err = -ENOENT;
+ goto error_new_virtqueue;
+ }
+
+ /* Create the vring */
+ align = virtio_mdev_readl(vm_dev->mdev, VIRTIO_MDEV_QUEUE_ALIGN);
+ vq = vring_create_virtqueue(index, num, align, vdev,
+ true, true, ctx,
+ virtio_mdev_notify, callback, name);
+ i...
2019 Sep 11
1
[RFC PATCH 3/4] virtio: introudce a mdev based transport
...> > > > > +
> > > > > +/* Queue selector - Write Only */
> > > > > +#define VIRTIO_MDEV_QUEUE_SEL 0x030
> > > > > +
> > > > > +/* Maximum size of the currently selected queue - Read Only */
> > > > > +#define VIRTIO_MDEV_QUEUE_NUM_MAX 0x034
> > > > > +
> > > > > +/* Queue size for the currently selected queue - Write Only */
> > > > > +#define VIRTIO_MDEV_QUEUE_NUM 0x038
> > > > > +
> > > > > +/* Ready bit for the currently selected queue - Read Write */...
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
...d features set selector - Write Only */
>> +#define VIRTIO_MDEV_DRIVER_FEATURES_SEL 0x024
>> +
>> +/* Queue selector - Write Only */
>> +#define VIRTIO_MDEV_QUEUE_SEL 0x030
>> +
>> +/* Maximum size of the currently selected queue - Read Only */
>> +#define VIRTIO_MDEV_QUEUE_NUM_MAX 0x034
>> +
>> +/* Queue size for the currently selected queue - Write Only */
>> +#define VIRTIO_MDEV_QUEUE_NUM 0x038
>> +
>> +/* Ready bit for the currently selected queue - Read Write */
>> +#define VIRTIO_MDEV_QUEUE_READY 0x044
>> +
>> +/* Alignm...
2019 Sep 17
0
[RFC v4 3/3] vhost: introduce mdev based hardware backend
...ev_writel(mdev, VIRTIO_MDEV_DEVICE_FEATURES_SEL, 0);
+ features |= virtio_mdev_readl(mdev, VIRTIO_MDEV_DEVICE_FEATURES);
+
+ if (!(features & (1ULL << VIRTIO_F_IOMMU_PLATFORM))) {
+ r = -EINVAL;
+ goto err_put_device;
+ }
+
+ m->features = features;
+
+ nvqs = virtio_mdev_readl(mdev, VIRTIO_MDEV_QUEUE_NUM_MAX);
+ m->nvqs = nvqs;
+
+ m->vqs = kmalloc_array(nvqs, sizeof(struct vhost_virtqueue),
+ GFP_KERNEL);
+ if (!m->vqs) {
+ r = -ENOMEM;
+ goto err_put_device;
+ }
+
+ vqs = kmalloc_array(nvqs, sizeof(*vqs), GFP_KERNEL);
+ if (!vqs) {
+ r = -ENOMEM;
+ goto err_free_vqs;
+ }
+
+ dev...
2019 Sep 10
1
[RFC PATCH 4/4] docs: Sample driver to demonstrate how to implement virtio-mdev framework
...D;
> + 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:
> + *val = MVNET_QUEUE_MAX;
> + break;
> + case VIRTIO_MDEV_QUEUE_READY:
> + *val = vq->ready;
> + break;
> + case VIRTIO_MDEV_QUEUE_ALIGN:
> + *val = MVNET_QUEUE_ALIGN;
> + break;
> + case VIRTIO_MDEV_STATUS:
> + *val = mvnet->status;
> + break;
>...
2019 Sep 10
0
[RFC PATCH 4/4] docs: Sample driver to demonstrate how to implement virtio-mdev framework
...+ 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:
+ *val = MVNET_QUEUE_MAX;
+ break;
+ case VIRTIO_MDEV_QUEUE_READY:
+ *val = vq->ready;
+ break;
+ case VIRTIO_MDEV_QUEUE_ALIGN:
+ *val = MVNET_QUEUE_ALIGN;
+ break;
+ case VIRTIO_MDEV_STATUS:
+ *val = mvnet->status;
+ break;
+ case VIRTIO_MDEV_QUEUE_DESC_LOW:
+ *val = vq->desc_ad...
2019 Sep 17
1
[RFC v4 3/3] vhost: introduce mdev based hardware backend
...);
> + features |= virtio_mdev_readl(mdev, VIRTIO_MDEV_DEVICE_FEATURES);
> +
> + if (!(features & (1ULL << VIRTIO_F_IOMMU_PLATFORM))) {
> + r = -EINVAL;
> + goto err_put_device;
> + }
> +
> + m->features = features;
> +
> + nvqs = virtio_mdev_readl(mdev, VIRTIO_MDEV_QUEUE_NUM_MAX);
> + m->nvqs = nvqs;
> +
> + m->vqs = kmalloc_array(nvqs, sizeof(struct vhost_virtqueue),
> + GFP_KERNEL);
> + if (!m->vqs) {
> + r = -ENOMEM;
> + goto err_put_device;
> + }
> +
> + vqs = kmalloc_array(nvqs, sizeof(*vqs), GFP_KERNEL);
> + if (!v...
2019 Sep 17
7
[RFC v4 0/3] vhost: introduce mdev based hardware backend
This RFC is to demonstrate below ideas,
a) Build vhost-mdev on top of the same abstraction defined in
the virtio-mdev series [1];
b) Introduce /dev/vhost-mdev to do vhost ioctls and support
setting mdev device as backend;
Now the userspace API looks like this:
- Userspace generates a compatible mdev device;
- Userspace opens this mdev device with VFIO API (including
doing IOMMU
2019 Sep 17
7
[RFC v4 0/3] vhost: introduce mdev based hardware backend
This RFC is to demonstrate below ideas,
a) Build vhost-mdev on top of the same abstraction defined in
the virtio-mdev series [1];
b) Introduce /dev/vhost-mdev to do vhost ioctls and support
setting mdev device as backend;
Now the userspace API looks like this:
- Userspace generates a compatible mdev device;
- Userspace opens this mdev device with VFIO API (including
doing IOMMU