|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [UNIKRAFT PATCH RFCv4 30/35] plat/virtio_9p: Remove excessive check for max virtqueue size
For qemu virtio mmio read with VIRTIO_MMIO_QUEUE_NUM_MAX, it will
unconditionally return VIRTQUEUE_MAX_SIZE(1024) unlike virtio pci.
But it can set the number of queue size when seting up the virtqueue.
See vm_setup_vq which will be fixed in coming patch.
So the excessive check in virtio 9p is not necessary.
Signed-off-by: Jia He <justin.he@xxxxxxx>
---
plat/drivers/virtio/virtio_9p.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/plat/drivers/virtio/virtio_9p.c b/plat/drivers/virtio/virtio_9p.c
index 045ce42..aead7a2 100644
--- a/plat/drivers/virtio/virtio_9p.c
+++ b/plat/drivers/virtio/virtio_9p.c
@@ -307,17 +307,15 @@ static int virtio_9p_vq_alloc(struct virtio_9p_device *d)
d->hwvq_id = 0;
if (unlikely(qdesc_size != NUM_SEGMENTS)) {
- uk_pr_err(DRIVER_NAME": Expected %d descriptors, found %d
(virtqueue %"
+ uk_pr_info(DRIVER_NAME": Expected %d descriptors, found %d
(virtqueue %"
PRIu16")\n", NUM_SEGMENTS, qdesc_size, d->hwvq_id);
- rc = -EINVAL;
- goto exit;
}
uk_sglist_init(&d->sg, ARRAY_SIZE(d->sgsegs), &d->sgsegs[0]);
d->vq = virtio_vqueue_setup(d->vdev,
d->hwvq_id,
- qdesc_size,
+ NUM_SEGMENTS,
virtio_9p_recv,
a);
if (unlikely(PTRISERR(d->vq))) {
--
2.17.1
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |