Skip to content

Commit 353244d

Browse files
jasowangmstsirkin
authored andcommitted
vhost-vdpa: prepare for the multiqueue support
Unlike vhost-kernel, vhost-vdpa adapts a single device multiqueue model. So we need to simply use virtqueue index as the vhost virtqueue index. This is a must for multiqueue to work for vhost-vdpa. Signed-off-by: Jason Wang <[email protected]> Message-Id: <[email protected]> Reviewed-by: Michael S. Tsirkin <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]>
1 parent 4d191cf commit 353244d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

hw/virtio/vhost-vdpa.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -546,8 +546,8 @@ static int vhost_vdpa_get_vq_index(struct vhost_dev *dev, int idx)
546546
{
547547
assert(idx >= dev->vq_index && idx < dev->vq_index + dev->nvqs);
548548

549-
trace_vhost_vdpa_get_vq_index(dev, idx, idx - dev->vq_index);
550-
return idx - dev->vq_index;
549+
trace_vhost_vdpa_get_vq_index(dev, idx, idx);
550+
return idx;
551551
}
552552

553553
static int vhost_vdpa_set_vring_ready(struct vhost_dev *dev)

0 commit comments

Comments
 (0)