freebsd-nq/sys/xen
Roger Pau Monné 6d54cab1fe xen: allow to register event channels without handlers
This is needed by the event channel user-space device, that requires
registering event channels without unmasking them. intr_add_handler
will unconditionally unmask the event channel, so we avoid calling it
if no filter/handler is provided, and then the user will be in charge
of calling it when ready.

In order to do this, we need to change the opaque type
xen_intr_handle_t to contain the event channel port instead of the
opaque cookie returned by intr_add_handler, since now registration of
event channels without handlers are allowed. The cookie will now be
stored inside of the private xenisrc struct. Also, introduce a new
function called xen_intr_add_handler that allows adding a
filter/handler after the event channel has been registered.

Sponsored by: Citrix Systems R&D

x86/xen/xen_intr.c:
 - Leave the event channel without a handler if no filter/handler is
   provided to xen_intr_bind_isrc.
 - Don't perform an evtchn_mask_port, intr_add_handler will already do
   it.
 - Change the opaque type xen_intr_handle_t to contain a pointer to
   the event channel port number, and make the necessary changes to
   related functions.
 - Introduce a new function called xen_intr_add_handler that can be
   used to add filter/handlers to an event channel after registration.

xen/xen_intr.h:
 - Add prototype of xen_intr_add_handler.
2014-10-22 16:51:52 +00:00
..
evtchn Implement vector callback for PVHVM and unify event channel implementations 2013-08-29 19:52:18 +00:00
interface msi: add Xen MSI implementation 2014-09-30 16:46:45 +00:00
xenbus Implement vector callback for PVHVM and unify event channel implementations 2013-08-29 19:52:18 +00:00
xenstore xen: convert the xenstore user-space char device to a newbus device 2014-09-30 17:31:04 +00:00
blkif.h
evtchn.h Implement vector callback for PVHVM and unify event channel implementations 2013-08-29 19:52:18 +00:00
features.c Implement vector callback for PVHVM and unify event channel implementations 2013-08-29 19:52:18 +00:00
features.h
gnttab.c xen: unify gnttab initialization for PVHVM and PVH 2014-06-16 08:48:42 +00:00
gnttab.h xen: unify gnttab initialization for PVHVM and PVH 2014-06-16 08:48:42 +00:00
hvm.h Merge Xen PVHVM support into the GENERIC kernel config for both 2013-09-20 22:59:22 +00:00
hypervisor.h
xen_intr.h xen: allow to register event channels without handlers 2014-10-22 16:51:52 +00:00
xen_msi.h msi: add Xen MSI implementation 2014-09-30 16:46:45 +00:00
xen_pv.h xen: add missing files 2014-06-16 08:54:04 +00:00
xen-os.h Make this compile with gcc. 2014-04-05 22:43:18 +00:00