virtio: struct virtio_config_ops add callbacks for queue_reset
authorXuan Zhuo <xuanzhuo@linux.alibaba.com>
Mon, 1 Aug 2022 06:38:22 +0000 (14:38 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 11 Aug 2022 08:06:38 +0000 (04:06 -0400)
commit3086e9fc9173166774652a488467e4176ee1c81b
tree37c7dbf726eb15c0b319c85d631a1f64b13f49fe
parentda802961832f9852886304290135457519815497
virtio: struct virtio_config_ops add callbacks for queue_reset

reset can be divided into the following four steps (example):
 1. transport: notify the device to reset the queue
 2. vring:     recycle the buffer submitted
 3. vring:     reset/resize the vring (may re-alloc)
 4. transport: mmap vring to device, and enable the queue

In order to support queue reset, add two callbacks in struct
virtio_config_ops to implement steps 1 and 4.

Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20220801063902.129329-3-xuanzhuo@linux.alibaba.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
include/linux/virtio_config.h