diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2016-10-21 22:48:05 +0200 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2016-10-30 19:51:32 +0200 |
commit | 4ddcc2d5cb8f14d43a4ed31beaad982557a418fd (patch) | |
tree | 19dab472587bbd5796e9017e5a5432358c4a7258 /hw/virtio/virtio-pci.c | |
parent | ca2b413c39b5cb2412bc236ddf3aa22d96594feb (diff) |
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>
Diffstat (limited to 'hw/virtio/virtio-pci.c')
-rw-r--r-- | hw/virtio/virtio-pci.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index 29896d8454..a8cf1e5f83 100644 --- a/hw/virtio/virtio-pci.c +++ b/hw/virtio/virtio-pci.c @@ -281,15 +281,7 @@ static bool virtio_pci_ioeventfd_disabled(DeviceState *d) { VirtIOPCIProxy *proxy = to_virtio_pci_proxy(d); - return proxy->ioeventfd_disabled || - !(proxy->flags & VIRTIO_PCI_FLAG_USE_IOEVENTFD); -} - -static void virtio_pci_ioeventfd_set_disabled(DeviceState *d, bool disabled) -{ - VirtIOPCIProxy *proxy = to_virtio_pci_proxy(d); - - proxy->ioeventfd_disabled = disabled; + return !(proxy->flags & VIRTIO_PCI_FLAG_USE_IOEVENTFD); } #define QEMU_VIRTIO_PCI_QUEUE_MEM_MULT 0x1000 @@ -2542,7 +2534,6 @@ static void virtio_pci_bus_class_init(ObjectClass *klass, void *data) k->ioeventfd_started = virtio_pci_ioeventfd_started; k->ioeventfd_set_started = virtio_pci_ioeventfd_set_started; k->ioeventfd_disabled = virtio_pci_ioeventfd_disabled; - k->ioeventfd_set_disabled = virtio_pci_ioeventfd_set_disabled; k->ioeventfd_assign = virtio_pci_ioeventfd_assign; } |