[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [RFC PATCH V4 07/18] Implement extended event channel ABIs query
This bitmap is a 64 bits unsigned integer. Each bit represents one ABI. Bit zero is reserved. Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> --- xen/common/event_channel.c | 12 ++++++++++++ xen/include/public/event_channel.h | 14 ++++++++++++++ xen/include/xen/event.h | 2 ++ 3 files changed, 28 insertions(+) diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c index 667fd89..6b23157 100644 --- a/xen/common/event_channel.c +++ b/xen/common/event_channel.c @@ -32,6 +32,9 @@ #include <public/event_channel.h> #include <xsm/xsm.h> +/* A bitmap of supported extended event channel ABIs */ +uint64_t extended_event_channel = EVTCHN_EXTENDED_NONE; + #define ERROR_EXIT(_errno) \ do { \ gdprintk(XENLOG_WARNING, \ @@ -1094,6 +1097,15 @@ long do_event_channel_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg) break; } + case EVTCHNOP_query_extended_abis: { + struct evtchn_query_extended_abis query; + query.abis = extended_event_channel; + rc = 0; + if ( __copy_to_guest(arg, &query, 1) ) + rc = -EFAULT; + break; + } + default: rc = -ENOSYS; break; diff --git a/xen/include/public/event_channel.h b/xen/include/public/event_channel.h index 472efdb..594ea76 100644 --- a/xen/include/public/event_channel.h +++ b/xen/include/public/event_channel.h @@ -71,6 +71,7 @@ #define EVTCHNOP_bind_vcpu 8 #define EVTCHNOP_unmask 9 #define EVTCHNOP_reset 10 +#define EVTCHNOP_query_extended_abis 11 /* ` } */ typedef uint32_t evtchn_port_t; @@ -258,6 +259,19 @@ struct evtchn_reset { typedef struct evtchn_reset evtchn_reset_t; /* + * EVTCHNOP_query_extended: Query the hypervisor for supported + * extended event channel ABIs. + */ +#define EVTCHN_EXTENDED_NONE 0 +#define _EVTCHN_EXTENDED_L3 1 +#define EVTCHN_EXTENDED_L3 (1UL << _EVTCHN_EXTENDED_L3) +struct evtchn_query_extended_abis { + /* OUT parameters. */ + uint64_t abis; +}; +typedef struct evtchn_query_extended_abis evtchn_query_extended_abis_t; + +/* * ` enum neg_errnoval * ` HYPERVISOR_event_channel_op_compat(struct evtchn_op *op) * ` diff --git a/xen/include/xen/event.h b/xen/include/xen/event.h index 6912195..fbbe9dc 100644 --- a/xen/include/xen/event.h +++ b/xen/include/xen/event.h @@ -157,4 +157,6 @@ void notify_via_xen_event_channel(struct domain *ld, int lport); mb(); /* set blocked status /then/ caller does his work */ \ } while ( 0 ) +/* A bitmap of supported extended event channel ABIs */ +extern uint64_t extended_event_channel; #endif /* __XEN_EVENT_H__ */ -- 1.7.10.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |