void virtio_bus_stop_ioeventfd(VirtioBusState *bus) { VirtIODevice *vdev; VirtioDeviceClass *vdc; if (!bus->ioeventfd_started) { return; } vdev = virtio_bus_get_device(bus); vdc = VIRTIO_DEVICE_GET_CLASS(vdev); vdc->stop_ioeventfd(vdev); bus->ioeventfd_started = false; }
void virtio_bus_stop_ioeventfd(VirtioBusState *bus) { VirtIODevice *vdev; VirtioDeviceClass *vdc; if (!bus->ioeventfd_started) { return; } /* Only remove our notifier if we have ownership. */ if (!bus->ioeventfd_grabbed) { vdev = virtio_bus_get_device(bus); vdc = VIRTIO_DEVICE_GET_CLASS(vdev); vdc->stop_ioeventfd(vdev); } bus->ioeventfd_started = false; }