diff options
| author | Jason Wang <jasowang@redhat.com> | 2021-10-20 12:55:58 +0800 |
|---|---|---|
| committer | Michael S. Tsirkin <mst@redhat.com> | 2021-10-20 04:44:05 -0400 |
| commit | 049eb15b5fc9c54ae76254a196b695000127da7a (patch) | |
| tree | f0ad6a3a82302ddbe400ecd68aac45c5168bfdd3 /include/hw/virtio/vhost.h | |
| parent | 441537f1ce0153978b4c9ee1cc4d4152147aa16f (diff) | |
| download | focaccia-qemu-049eb15b5fc9c54ae76254a196b695000127da7a.tar.gz focaccia-qemu-049eb15b5fc9c54ae76254a196b695000127da7a.zip | |
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>
Diffstat (limited to 'include/hw/virtio/vhost.h')
| -rw-r--r-- | include/hw/virtio/vhost.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/hw/virtio/vhost.h b/include/hw/virtio/vhost.h index 1a9fc65089..3fa0b554ef 100644 --- a/include/hw/virtio/vhost.h +++ b/include/hw/virtio/vhost.h @@ -74,6 +74,8 @@ struct vhost_dev { unsigned int nvqs; /* the first virtqueue which would be used by this vhost dev */ int vq_index; + /* the last vq index for the virtio device (not vhost) */ + int last_index; /* if non-zero, minimum required value for max_queues */ int num_queues; uint64_t features; |