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

[Xen-devel] [PATCH RFC 09/18] OvmfPkg/XenbusDxe: Add Event Channel Notify.



This first function is used to notify the other side that there is
something to do. The other side is another Xen domain.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
---
 OvmfPkg/XenbusDxe/EventChannel.c | 16 ++++++++++++++++
 OvmfPkg/XenbusDxe/EventChannel.h | 14 ++++++++++++++
 OvmfPkg/XenbusDxe/XenbusDxe.inf  |  2 ++
 3 files changed, 32 insertions(+)
 create mode 100644 OvmfPkg/XenbusDxe/EventChannel.c
 create mode 100644 OvmfPkg/XenbusDxe/EventChannel.h

diff --git a/OvmfPkg/XenbusDxe/EventChannel.c b/OvmfPkg/XenbusDxe/EventChannel.c
new file mode 100644
index 0000000..4ab8a40
--- /dev/null
+++ b/OvmfPkg/XenbusDxe/EventChannel.c
@@ -0,0 +1,16 @@
+#include "EventChannel.h"
+#include "XenHypercall.h"
+
+VOID
+XenEventChannelNotify (
+  IN XENBUS_DEVICE *Dev,
+  IN evtchn_port_t Port
+  )
+{
+  INTN ReturnCode;
+  evtchn_send_t send;
+
+  send.port = Port;
+  ReturnCode = XenHypercallEventChannelOp (Dev, EVTCHNOP_send, &send);
+  ASSERT (ReturnCode == 0);
+}
diff --git a/OvmfPkg/XenbusDxe/EventChannel.h b/OvmfPkg/XenbusDxe/EventChannel.h
new file mode 100644
index 0000000..8a3f6d4
--- /dev/null
+++ b/OvmfPkg/XenbusDxe/EventChannel.h
@@ -0,0 +1,14 @@
+#ifndef __XENBUS_EVENT_CHANNEL_H
+#define __XENBUS_EVENT_CHANNEL_H
+
+#include "XenbusDxe.h"
+
+#include <IndustryStandard/Xen/event_channel.h>
+
+VOID
+XenEventChannelNotify (
+  IN XENBUS_DEVICE *Dev,
+  IN evtchn_port_t Port
+  );
+
+#endif
diff --git a/OvmfPkg/XenbusDxe/XenbusDxe.inf b/OvmfPkg/XenbusDxe/XenbusDxe.inf
index 093932b..d4007db 100644
--- a/OvmfPkg/XenbusDxe/XenbusDxe.inf
+++ b/OvmfPkg/XenbusDxe/XenbusDxe.inf
@@ -36,6 +36,8 @@
   InterlockedCompareExchange16.h
   GrantTable.c
   GrantTable.h
+  EventChannel.c
+  EventChannel.h
 
 [Sources.X64]
   X64/hypercall.S
-- 
Anthony PERARD


_______________________________________________
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®.