virtio: move ioeventfd_disabled flag to VirtioBusState

This simplifies the code and removes the ioeventfd_set_disabled
callback.

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:
Paolo Bonzini 2016-10-21 22:48:05 +02:00 committed by Michael S. Tsirkin
parent ca2b413c39
commit 4ddcc2d5cb
7 changed files with 11 additions and 38 deletions

View file

@ -83,8 +83,6 @@ typedef struct VirtioBusClass {
void (*ioeventfd_set_started)(DeviceState *d, bool started, bool err);
/* Returns true if the ioeventfd has been disabled for the device. */
bool (*ioeventfd_disabled)(DeviceState *d);
/* Sets the 'ioeventfd disabled' state for the device. */
void (*ioeventfd_set_disabled)(DeviceState *d, bool disabled);
/*
* Assigns/deassigns the ioeventfd backing for the transport on
* the device for queue number n. Returns an error value on
@ -102,6 +100,12 @@ typedef struct VirtioBusClass {
struct VirtioBusState {
BusState parent_obj;
/*
* Set if the default ioeventfd handlers are disabled by vhost
* or dataplane.
*/
bool ioeventfd_disabled;
};
void virtio_bus_device_plugged(VirtIODevice *vdev, Error **errp);