[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [RFC PATCH V5 07/15] evtchn: define 3-level event channel registration interface
This event channel op has two sub-commands: * REGISTER_BITMAPS: register the shared pending / mask bitmaps * REGISTER_L2_SELECTOR: register L2 selector for the specific vcpu. The guest should issue REGISTER_BITMAPS first. If the registration of bitmaps succeed, it can issue REGISTER_L2_SELECTOR. Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> --- xen/include/public/event_channel.h | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/xen/include/public/event_channel.h b/xen/include/public/event_channel.h index 594ea76..59a9780 100644 --- a/xen/include/public/event_channel.h +++ b/xen/include/public/event_channel.h @@ -72,6 +72,7 @@ #define EVTCHNOP_unmask 9 #define EVTCHNOP_reset 10 #define EVTCHNOP_query_extended_abis 11 +#define EVTCHNOP_register_3level 12 /* ` } */ typedef uint32_t evtchn_port_t; @@ -272,6 +273,39 @@ struct evtchn_query_extended_abis { typedef struct evtchn_query_extended_abis evtchn_query_extended_abis_t; /* + * EVTCHNOP_register_3level: Register 3-level event channel. + */ +/* + * 64 bit guests need 8 pages for evtchn_pending and evtchn_mask for + * 256k event channels while 32 bit ones only need 1 page for 32k + * event channels. + */ +#define EVTCHN_MAX_L3_PAGES 8 +/* + * A guest should register the bitmaps first, then register L2 selector for + * individual cpu. + */ +#define REGISTER_BITMAPS 1 +#define REGISTER_L2_SELECTOR 2 +struct evtchn_register_3level { + /* IN parameters. */ + uint32_t cmd; + union { + struct { + uint32_t nr_pages; + XEN_GUEST_HANDLE(xen_pfn_t) evtchn_pending; + XEN_GUEST_HANDLE(xen_pfn_t) evtchn_mask; + } bitmaps; + struct { + uint32_t cpu_id; + xen_pfn_t mfn; /* mfn of L2 selector */ + xen_pfn_t offset; /* offset of L2 selector within page */ + } l2_selector; + } u; +}; +typedef struct evtchn_register_3level evtchn_register_3level_t; + +/* * ` enum neg_errnoval * ` HYPERVISOR_event_channel_op_compat(struct evtchn_op *op) * ` -- 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 |