mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
virtio-pci: support queue reset
PCI devices support vq reset. Based on this function, the driver can adjust the size of the ring, and quickly recycle the buffer in the ring. The migration of the virtio devices will not happen during a reset operation. This is becuase the global iothread lock is held. Migration thread also needs the lock. As a result, when migration of virtio devices starts, the 'reset' status of VirtIOPCIQueue will always be 0. Thus, we do not need to add it in vmstate_virtio_pci_modern_queue_state. Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com> Signed-off-by: Kangjie Xu <kangjie.xu@linux.alibaba.com> Acked-by: Jason Wang <jasowang@redhat.com> Message-Id: <20221017092558.111082-6-xuanzhuo@linux.alibaba.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
69e1c14aa2
commit
805d782d28
2 changed files with 20 additions and 0 deletions
|
@ -117,6 +117,11 @@ typedef struct VirtIOPCIRegion {
|
|||
typedef struct VirtIOPCIQueue {
|
||||
uint16_t num;
|
||||
bool enabled;
|
||||
/*
|
||||
* No need to migrate the reset status, because it is always 0
|
||||
* when the migration starts.
|
||||
*/
|
||||
bool reset;
|
||||
uint32_t desc[2];
|
||||
uint32_t avail[2];
|
||||
uint32_t used[2];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue