summaryrefslogtreecommitdiffstats
path: root/include/hw/xen
diff options
context:
space:
mode:
authorPaul Durrant2019-04-08 17:16:17 +0200
committerAnthony PERARD2019-06-24 11:42:29 +0200
commit345f42b4be9f9975ff3f7f3e95acae4f67c74f89 (patch)
treee9c8d791310f56d9e36be4851d9b84a870d62375 /include/hw/xen
parentxen-bus: allow AioContext to be specified for each event channel (diff)
downloadqemu-345f42b4be9f9975ff3f7f3e95acae4f67c74f89.tar.gz
qemu-345f42b4be9f9975ff3f7f3e95acae4f67c74f89.tar.xz
qemu-345f42b4be9f9975ff3f7f3e95acae4f67c74f89.zip
xen-bus / xen-block: add support for event channel polling
This patch introduces a poll callback for event channel fd-s and uses this to invoke the channel callback function. To properly support polling, it is necessary for the event channel callback function to return a boolean saying whether it has done any useful work or not. Thus xen_block_dataplane_event() is modified to directly invoke xen_block_handle_requests() and the latter only returns true if it actually processes any requests. This also means that the call to qemu_bh_schedule() is moved into xen_block_complete_aio(), which is more intuitive since the only reason for doing a deferred poll of the shared ring should be because there were previously insufficient resources to fully complete a previous poll. Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Reviewed-by: Anthony PERARD <anthony.perard@citrix.com> Message-Id: <20190408151617.13025-4-paul.durrant@citrix.com> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Diffstat (limited to 'include/hw/xen')
-rw-r--r--include/hw/xen/xen-bus.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/hw/xen/xen-bus.h b/include/hw/xen/xen-bus.h
index 8183b98c7d..1c2d9dfdb8 100644
--- a/include/hw/xen/xen-bus.h
+++ b/include/hw/xen/xen-bus.h
@@ -119,7 +119,7 @@ void xen_device_copy_grant_refs(XenDevice *xendev, bool to_domain,
XenDeviceGrantCopySegment segs[],
unsigned int nr_segs, Error **errp);
-typedef void (*XenEventHandler)(void *opaque);
+typedef bool (*XenEventHandler)(void *opaque);
XenEventChannel *xen_device_bind_event_channel(XenDevice *xendev,
AioContext *ctx,