diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2012-07-05 17:16:30 +0200 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2012-07-12 14:08:11 +0300 |
commit | 15b2bd1847239fe0b4a1041b69a631741d2e273a (patch) | |
tree | 36b395a7ea3642442e9f45ec4280013ca56ae033 /hw/virtio.h | |
parent | b1f416aa8d870fab71030abc9401cfc77b948e8e (diff) |
virtio: move common irqfd handling out of virtio-pci
All transports can use the same event handler for the irqfd, though the
exact mechanics of the assignment will be specific. Note that there
are three states: handled by the kernel, handled in userspace, disabled.
This also lets virtio use event_notifier_set_handler.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'hw/virtio.h')
-rw-r--r-- | hw/virtio.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/virtio.h b/hw/virtio.h index 294948519c..96f4dbb8d9 100644 --- a/hw/virtio.h +++ b/hw/virtio.h @@ -231,6 +231,8 @@ void virtio_queue_set_last_avail_idx(VirtIODevice *vdev, int n, uint16_t idx); VirtQueue *virtio_get_queue(VirtIODevice *vdev, int n); int virtio_queue_get_id(VirtQueue *vq); EventNotifier *virtio_queue_get_guest_notifier(VirtQueue *vq); +void virtio_queue_set_guest_notifier_fd_handler(VirtQueue *vq, bool assign, + bool with_irqfd); EventNotifier *virtio_queue_get_host_notifier(VirtQueue *vq); void virtio_queue_set_host_notifier_fd_handler(VirtQueue *vq, bool assign); void virtio_queue_notify_vq(VirtQueue *vq); |