mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
virtio: clear signalled_used_valid when switching from dataplane
When the dataplane thread stops, its vring.c implementation synchronizes vring state back to virtio.c so we can continue emulating the virtio device. This patch ensures that virtio.c's signalled_used_valid flag is reset so that we do not suppress guest notifications due to stale signalled_used values. Suggested-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
4965b7f056
commit
6793dfd1b6
3 changed files with 7 additions and 0 deletions
|
@ -1059,6 +1059,11 @@ void virtio_queue_set_last_avail_idx(VirtIODevice *vdev, int n, uint16_t idx)
|
|||
vdev->vq[n].last_avail_idx = idx;
|
||||
}
|
||||
|
||||
void virtio_queue_invalidate_signalled_used(VirtIODevice *vdev, int n)
|
||||
{
|
||||
vdev->vq[n].signalled_used_valid = false;
|
||||
}
|
||||
|
||||
VirtQueue *virtio_get_queue(VirtIODevice *vdev, int n)
|
||||
{
|
||||
return vdev->vq + n;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue