vhost: record the last virtqueue index for the virtio device
commit049eb15b5fc9c54ae76254a196b695000127da7a
authorJason Wang <jasowang@redhat.com>
Wed, 20 Oct 2021 04:55:58 +0000 (20 12:55 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 20 Oct 2021 08:44:05 +0000 (20 04:44 -0400)
treef0ad6a3a82302ddbe400ecd68aac45c5168bfdd3
parent441537f1ce0153978b4c9ee1cc4d4152147aa16f
vhost: record the last virtqueue index for the virtio device

This patch introduces a new field in the vhost_dev structure to record
the last virtqueue index for the virtio device. This will be useful
for the vhost backends with 1:N model to start or stop the device
after all the vhost_dev structures were started or stopped.

Signed-off-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20211020045600.16082-9-jasowang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/net/vhost_net.c
include/hw/virtio/vhost.h