mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
virtio: remove event notifier cleanup call on de-assign
The virtio_bus_set_host_notifier function no longer calls event_notifier_cleanup when a event notifier is removed. The commit updates the code to match the new behavior and calls virtio_bus_cleanup_host_notifier after the notifier was de-assign and no longer in use. This change is a preparation to allow executing the virtio_bus_set_host_notifier function in a memory region transaction. Signed-off-by: Gal Hammer <ghammer@redhat.com> Reviewed-by: Greg Kurz <groug@kaod.org> Tested-by: Greg Kurz <groug@kaod.org> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
f41d912023
commit
76143618a5
6 changed files with 20 additions and 4 deletions
|
@ -2608,6 +2608,7 @@ assign_error:
|
|||
event_notifier_set_handler(&vq->host_notifier, NULL);
|
||||
r = virtio_bus_set_host_notifier(qbus, n, false);
|
||||
assert(r >= 0);
|
||||
virtio_bus_cleanup_host_notifier(qbus, n);
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
@ -2634,6 +2635,7 @@ static void virtio_device_stop_ioeventfd_impl(VirtIODevice *vdev)
|
|||
event_notifier_set_handler(&vq->host_notifier, NULL);
|
||||
r = virtio_bus_set_host_notifier(qbus, n, false);
|
||||
assert(r >= 0);
|
||||
virtio_bus_cleanup_host_notifier(qbus, n);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue