mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
virtio: move ioeventfd_started flag to VirtioBusState
This simplifies the code and removes the ioeventfd_started and ioeventfd_set_started callback. The only difference is in how virtio-ccw handles an error---it doesn't disable ioeventfd forever anymore. It was the only backend to do so, and if desired this behavior should be implemented in virtio-bus.c. Instead of ioeventfd_started, the ioeventfd_assign callback now determines whether the virtio bus supports host notifiers. 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
4ddcc2d5cb
commit
b13d396227
10 changed files with 16 additions and 79 deletions
|
@ -70,17 +70,9 @@ typedef struct VirtioBusClass {
|
|||
void (*device_unplugged)(DeviceState *d);
|
||||
int (*query_nvectors)(DeviceState *d);
|
||||
/*
|
||||
* ioeventfd handling: if the transport implements ioeventfd_started,
|
||||
* it must implement the other ioeventfd callbacks as well
|
||||
* ioeventfd handling: if the transport implements ioeventfd_assign,
|
||||
* it must implement ioeventfd_disabled as well.
|
||||
*/
|
||||
/* Returns true if the ioeventfd has been started for the device. */
|
||||
bool (*ioeventfd_started)(DeviceState *d);
|
||||
/*
|
||||
* Sets the 'ioeventfd started' state after the ioeventfd has been
|
||||
* started/stopped for the device. err signifies whether an error
|
||||
* had occurred.
|
||||
*/
|
||||
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);
|
||||
/*
|
||||
|
@ -106,6 +98,11 @@ struct VirtioBusState {
|
|||
* or dataplane.
|
||||
*/
|
||||
bool ioeventfd_disabled;
|
||||
|
||||
/*
|
||||
* Set if ioeventfd has been started.
|
||||
*/
|
||||
bool ioeventfd_started;
|
||||
};
|
||||
|
||||
void virtio_bus_device_plugged(VirtIODevice *vdev, Error **errp);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue