Displaying 4 results from an estimated 4 matches for "vhost_translate_ring_addr".
2019 Sep 17
1
[RFC v4 3/3] vhost: introduce mdev based hardware backend
...-ENODEV;
> +
> + for (queue_id = 0; queue_id < m->nvqs; queue_id++) {
> + vq = &m->vqs[queue_id];
> +
> + if (!vq->desc || !vq->avail || !vq->used)
> + break;
> +
> + virtio_mdev_writel(mdev, VIRTIO_MDEV_QUEUE_NUM, vq->num);
> +
> + if (!vhost_translate_ring_addr(vq, (u64)vq->desc,
> + vhost_get_desc_size(vq, vq->num),
> + &addr))
> + return -EINVAL;
Interesting, any reason for doing such kinds of translation to HVA? I
believe the add should already an IOVA that has been map by VFIO.
> +
> + virtio_mdev...
2019 Sep 17
0
[RFC v4 3/3] vhost: introduce mdev based hardware backend
...dev) & VIRTIO_CONFIG_S_FEATURES_OK))
+ return -ENODEV;
+
+ for (queue_id = 0; queue_id < m->nvqs; queue_id++) {
+ vq = &m->vqs[queue_id];
+
+ if (!vq->desc || !vq->avail || !vq->used)
+ break;
+
+ virtio_mdev_writel(mdev, VIRTIO_MDEV_QUEUE_NUM, vq->num);
+
+ if (!vhost_translate_ring_addr(vq, (u64)vq->desc,
+ vhost_get_desc_size(vq, vq->num),
+ &addr))
+ return -EINVAL;
+
+ virtio_mdev_writel(mdev, VIRTIO_MDEV_QUEUE_DESC_LOW, addr);
+ virtio_mdev_writel(mdev, VIRTIO_MDEV_QUEUE_DESC_HIGH,
+ (addr >> 32));
+
+ if (!vhost_translate_ring_...
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