[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [RFC PATCH V5 13/14] xen: introduce xen_event_channel_register_extended



Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
 drivers/xen/events.c |   26 ++++++++++++++++++++++++++
 include/xen/events.h |    6 ++++++
 2 files changed, 32 insertions(+)

diff --git a/drivers/xen/events.c b/drivers/xen/events.c
index 6bb9a47..6f21f27 100644
--- a/drivers/xen/events.c
+++ b/drivers/xen/events.c
@@ -2265,6 +2265,32 @@ static int xen_event_channel_register_3level(void)
        return rc;
 }
 
+int xen_event_channel_register_extended(uint64_t abi)
+{
+       int rc = -EINVAL;
+
+       switch (abi) {
+       case EVTCHN_EXTENDED_L3:
+               rc = xen_event_channel_register_3level();
+               if (rc == 0)
+                       printk(KERN_INFO
+                              "Register 3-level event channel succeed.\n");
+               else
+                       printk(KERN_INFO
+                              "Register 3-level event channel failed: %d\n",
+                              rc);
+               break;
+       default:
+               printk(KERN_EMERG
+                      "Trying to register unsupported event channel ABI 
%llx\n",
+                      abi);
+               BUG();
+       }
+
+       return rc;
+}
+
+
 const struct evtchn_ops evtchn_l2_ops = {
        .unmask = __unmask_local_port_l2,
        .debug_interrupt = xen_debug_interrupt_l2,
diff --git a/include/xen/events.h b/include/xen/events.h
index 49d54ac..a6a6024 100644
--- a/include/xen/events.h
+++ b/include/xen/events.h
@@ -117,4 +117,10 @@ extern uint64_t xen_evtchn_extended;
 /* Query hypervisor for supported / enabled extended event channel ABIs. */
 uint64_t xen_event_channel_query_extended_abis(void);
 
+/* Set extended event channel to "abi". */
+void xen_set_event_channel_extended(uint64_t abi);
+
+/* Register extended event channel. */
+int xen_event_channel_register_extended(uint64_t abi);
+
 #endif /* _XEN_EVENTS_H */
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.