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.per...@citrix.com> --- 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 ------------------------------------------------------------------------------ Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel