mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
virtio: introduce virtio_device_ioeventfd_enabled
This will be used to forbid iothread configuration when the proxy does not allow using ioeventfd. To simplify the implementation, change the direction of the ioeventfd_disabled callback too. Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
ff4c07df67
commit
8e93cef14e
7 changed files with 32 additions and 13 deletions
|
@ -2247,6 +2247,14 @@ static void virtio_device_class_init(ObjectClass *klass, void *data)
|
|||
vdc->stop_ioeventfd = virtio_device_stop_ioeventfd_impl;
|
||||
}
|
||||
|
||||
bool virtio_device_ioeventfd_enabled(VirtIODevice *vdev)
|
||||
{
|
||||
BusState *qbus = qdev_get_parent_bus(DEVICE(vdev));
|
||||
VirtioBusState *vbus = VIRTIO_BUS(qbus);
|
||||
|
||||
return virtio_bus_ioeventfd_enabled(vbus);
|
||||
}
|
||||
|
||||
static const TypeInfo virtio_device_info = {
|
||||
.name = TYPE_VIRTIO_DEVICE,
|
||||
.parent = TYPE_DEVICE,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue