diff options
author | Oleksandr Andrushchenko | 2020-08-06 12:42:49 +0300 |
---|---|---|
committer | Tom Rini | 2020-08-14 15:18:30 -0400 |
commit | 673fd82c507cf2a674ca6ec6d84d8d2854a6d78c (patch) | |
tree | e1ff4e490d5f7da907994a6d6b1ff3b180a9e420 /include/xen | |
parent | 486544161fa97accff12c2fc585ffe218b8dfc52 (diff) |
xen: Port Xen event channel driver from mini-os
Make required updates to run on u-boot. Strip functionality
not needed by U-boot.
Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Signed-off-by: Anastasiia Lukianenko <anastasiia_lukianenko@epam.com>
Diffstat (limited to 'include/xen')
-rw-r--r-- | include/xen/events.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/include/xen/events.h b/include/xen/events.h new file mode 100644 index 00000000000..82bd18b48c8 --- /dev/null +++ b/include/xen/events.h @@ -0,0 +1,42 @@ +/* SPDX-License-Identifier: GPL-2.0 + * + * (C) 2003 - Rolf Neugebauer - Intel Research Cambridge + * (C) 2005 - Grzegorz Milos - Intel Reseach Cambridge + * (C) 2020 - EPAM Systems Inc. + * + * File: events.h + * Author: Rolf Neugebauer (neugebar@dcs.gla.ac.uk) + * Changes: Grzegorz Milos (gm281@cam.ac.uk) + * + * Date: Jul 2003, changes Jun 2005 + * + * Description: Deals with events on the event channels + */ +#ifndef _EVENTS_H_ +#define _EVENTS_H_ + +#include <asm/xen/hypercall.h> +#include <xen/interface/event_channel.h> + +void init_events(void); +void fini_events(void); + +int do_event(evtchn_port_t port, struct pt_regs *regs); +void unbind_evtchn(evtchn_port_t port); +void unbind_all_ports(void); +int evtchn_alloc_unbound(domid_t pal, + void (*handler)(evtchn_port_t, struct pt_regs *, void *), + void *data, evtchn_port_t *port); + +/* Send notification via event channel */ +static inline int notify_remote_via_evtchn(evtchn_port_t port) +{ + struct evtchn_send op; + + op.port = port; + return HYPERVISOR_event_channel_op(EVTCHNOP_send, &op); +} + +void eventchn_poll(void); + +#endif /* _EVENTS_H_ */ |