Commit Message

This patch converts the vhost to support multiqueue queues. It implement a 1:1
mapping of vhost devs and tap fds. That it to say, the patch creates and uses
N vhost devs as the backend of the N queues virtio-net deivce.
The main work is to convert the virtqueue index into vhost queue index, this is
done by introducing an vq_index filed in vhost_dev struct to record the index of
first virtuque that is used by the vhost devs. Then vhost could simply convert
it to the local vhost queue index and issue ioctls.
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
hw/vhost.c | 53 ++++++++++++++++++++++++++++++++++-------------------
hw/vhost.h | 2 ++
hw/vhost_net.c | 7 +++++--
hw/vhost_net.h | 2 +-
hw/virtio-net.c | 2 +-
5 files changed, 43 insertions(+), 23 deletions(-)