@@ -66,6 +66,11 @@ static int vhost_virtqueue_init(struct vhost_dev *dev,
r = ioctl(dev->control, VHOST_SET_VRING_AVAIL, &addr);
if (r < 0)
return -errno;
+
+ fprintf(stderr, "VQ %d, avail va %p(=%llx), pa %llx, num %x size %llx\n",
+ idx, vq->avail, (unsigned long long)addr.user_addr,
+ (unsigned long long)q->vring.avail, (unsigned)q->vring.num, s);
+
s = l = offsetof(struct vring_used, ring) +
sizeof(struct vring_used_elem) * q->vring.num;
vq->used = cpu_physical_memory_map(q->vring.used, &l, 1);