]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit616512fa9c47c71ffdffa1a809c05badcf7f3cde
tree37c7dbf726eb15c0b319c85d631a1f64b13f49fe
parent036af8d5c8826b55eeaad34638011a080aad325f
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