virtio: postpone the execution of event_notifier_cleanup function
commit4fe6d78b2e241f41208dfb07605aace4becfc747
authorGal Hammer <ghammer@redhat.com>
Sun, 14 Jan 2018 10:06:55 +0000 (14 12:06 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 18 Jan 2018 19:52:37 +0000 (18 21:52 +0200)
tree85a395c6e7f764185229f3e190daa87db314fd51
parentf87d72f5c5bff0837d409a56bd34f439a90119ca
virtio: postpone the execution of event_notifier_cleanup function

Use the EventNotifier's cleanup callback function to execute the
event_notifier_cleanup function after kvm unregistered the eventfd.

This change supports running the virtio_bus_set_host_notifier
function inside a memory region transaction. Otherwise, a closed
fd is sent to kvm, which results in a failure.

Signed-off-by: Gal Hammer <ghammer@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
accel/kvm/kvm-all.c
hw/virtio/virtio-bus.c