|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [win-pv-devel] [PATCH] Update to EVTCHN version 3
Take the opportunity to refresh all imported headers though as there's a
small doxygen tweak in each of them too.
Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx>
---
include/cache_interface.h | 1 +
include/debug_interface.h | 1 +
include/emulated_interface.h | 1 +
include/evtchn_interface.h | 69 +++++++++++++++++++++++++++++++++++++++-----
include/gnttab_interface.h | 1 +
include/store_interface.h | 1 +
include/suspend_interface.h | 1 +
src/xenvbd/notifier.c | 33 +++++++++------------
8 files changed, 81 insertions(+), 27 deletions(-)
diff --git a/include/cache_interface.h b/include/cache_interface.h
index 12599ef..dae3ac6 100644
--- a/include/cache_interface.h
+++ b/include/cache_interface.h
@@ -205,6 +205,7 @@ DEFINE_GUID(GUID_XENBUS_CACHE_INTERFACE,
/*! \struct _XENBUS_CACHE_INTERFACE_V1
\brief CACHE interface version 1
+ \ingroup interfaces
*/
struct _XENBUS_CACHE_INTERFACE_V1 {
INTERFACE Interface;
diff --git a/include/debug_interface.h b/include/debug_interface.h
index 0b4f763..cc71db0 100644
--- a/include/debug_interface.h
+++ b/include/debug_interface.h
@@ -146,6 +146,7 @@ DEFINE_GUID(GUID_XENBUS_DEBUG_INTERFACE,
/*! \struct _XENBUS_DEBUG_INTERFACE_V1
\brief DEBUG interface version 1
+ \ingroup interfaces
*/
struct _XENBUS_DEBUG_INTERFACE_V1 {
INTERFACE Interface;
diff --git a/include/emulated_interface.h b/include/emulated_interface.h
index 0019c1b..85ed2b8 100644
--- a/include/emulated_interface.h
+++ b/include/emulated_interface.h
@@ -101,6 +101,7 @@ DEFINE_GUID(GUID_XENFILT_EMULATED_INTERFACE,
/*! \struct _XENFILT_EMULATED_INTERFACE_V1
\brief EMULATED interface version 1
+ \ingroup interfaces
*/
struct _XENFILT_EMULATED_INTERFACE_V1 {
INTERFACE Interface;
diff --git a/include/evtchn_interface.h b/include/evtchn_interface.h
index 207f341..1bc456a 100644
--- a/include/evtchn_interface.h
+++ b/include/evtchn_interface.h
@@ -112,19 +112,39 @@ typedef PXENBUS_EVTCHN_CHANNEL
...
);
+/*! \typedef XENBUS_EVTCHN_BIND
+ \brief Bind an event channel to a specific CPU
+
+ \param Interface The interface header
+ \param Channel The channel handle
+ \param Cpu The CPU that should handle events
+*/
+typedef NTSTATUS
+(*XENBUS_EVTCHN_BIND)(
+ IN PINTERFACE Interface,
+ IN PXENBUS_EVTCHN_CHANNEL Channel,
+ IN ULONG Cpu
+ );
+
+typedef BOOLEAN
+(*XENBUS_EVTCHN_UNMASK_V1)(
+ IN PINTERFACE Interface,
+ IN PXENBUS_EVTCHN_CHANNEL Channel,
+ IN BOOLEAN InCallback
+ );
+
/*! \typedef XENBUS_EVTCHN_UNMASK
\brief Unmask an event channel
\param Interface The interface header
\param Channel The channel handle
- \param Locked Set to TRUE if this method is invoked in context of the
channel callback
- \return TRUE if there was an event pending at the point of unmask, FALSE
otherwise
+ \param InCallback Set to TRUE if this method is invoked in context of the
channel callback
*/
-typedef BOOLEAN
+typedef VOID
(*XENBUS_EVTCHN_UNMASK)(
IN PINTERFACE Interface,
IN PXENBUS_EVTCHN_CHANNEL Channel,
- IN BOOLEAN Locked
+ IN BOOLEAN InCallback
);
/*! \typedef XENBUS_EVTCHN_SEND
@@ -182,20 +202,55 @@ DEFINE_GUID(GUID_XENBUS_EVTCHN_INTERFACE,
/*! \struct _XENBUS_EVTCHN_INTERFACE_V1
\brief EVTCHN interface version 1
+ \ingroup interfaces
*/
struct _XENBUS_EVTCHN_INTERFACE_V1 {
INTERFACE Interface;
XENBUS_EVTCHN_ACQUIRE EvtchnAcquire;
XENBUS_EVTCHN_RELEASE EvtchnRelease;
XENBUS_EVTCHN_OPEN EvtchnOpen;
+ XENBUS_EVTCHN_UNMASK_V1 EvtchnUnmaskVersion1;
+ XENBUS_EVTCHN_SEND EvtchnSend;
+ XENBUS_EVTCHN_TRIGGER EvtchnTrigger;
+ XENBUS_EVTCHN_GET_PORT EvtchnGetPort;
+ XENBUS_EVTCHN_CLOSE EvtchnClose;
+};
+
+/*! \struct _XENBUS_EVTCHN_INTERFACE_V2
+ \brief EVTCHN interface version 2
+ \ingroup interfaces
+*/
+struct _XENBUS_EVTCHN_INTERFACE_V2 {
+ INTERFACE Interface;
+ XENBUS_EVTCHN_ACQUIRE EvtchnAcquire;
+ XENBUS_EVTCHN_RELEASE EvtchnRelease;
+ XENBUS_EVTCHN_OPEN EvtchnOpen;
+ XENBUS_EVTCHN_BIND EvtchnBind;
+ XENBUS_EVTCHN_UNMASK_V1 EvtchnUnmaskVersion1;
+ XENBUS_EVTCHN_SEND EvtchnSend;
+ XENBUS_EVTCHN_TRIGGER EvtchnTrigger;
+ XENBUS_EVTCHN_GET_PORT EvtchnGetPort;
+ XENBUS_EVTCHN_CLOSE EvtchnClose;
+};
+
+/*! \struct _XENBUS_EVTCHN_INTERFACE_V3
+ \brief EVTCHN interface version 3
+ \ingroup interfaces
+*/
+struct _XENBUS_EVTCHN_INTERFACE_V3 {
+ INTERFACE Interface;
+ XENBUS_EVTCHN_ACQUIRE EvtchnAcquire;
+ XENBUS_EVTCHN_RELEASE EvtchnRelease;
+ XENBUS_EVTCHN_OPEN EvtchnOpen;
+ XENBUS_EVTCHN_BIND EvtchnBind;
XENBUS_EVTCHN_UNMASK EvtchnUnmask;
XENBUS_EVTCHN_SEND EvtchnSend;
- XENBUS_EVTCHN_SEND EvtchnTrigger;
+ XENBUS_EVTCHN_TRIGGER EvtchnTrigger;
XENBUS_EVTCHN_GET_PORT EvtchnGetPort;
XENBUS_EVTCHN_CLOSE EvtchnClose;
};
-typedef struct _XENBUS_EVTCHN_INTERFACE_V1 XENBUS_EVTCHN_INTERFACE,
*PXENBUS_EVTCHN_INTERFACE;
+typedef struct _XENBUS_EVTCHN_INTERFACE_V3 XENBUS_EVTCHN_INTERFACE,
*PXENBUS_EVTCHN_INTERFACE;
/*! \def XENBUS_EVTCHN
\brief Macro at assist in method invocation
@@ -206,7 +261,7 @@ typedef struct _XENBUS_EVTCHN_INTERFACE_V1
XENBUS_EVTCHN_INTERFACE, *PXENBUS_EVT
#endif // _WINDLL
#define XENBUS_EVTCHN_INTERFACE_VERSION_MIN 1
-#define XENBUS_EVTCHN_INTERFACE_VERSION_MAX 1
+#define XENBUS_EVTCHN_INTERFACE_VERSION_MAX 3
#endif // _XENBUS_EVTCHN_INTERFACE_H
diff --git a/include/gnttab_interface.h b/include/gnttab_interface.h
index c9d005f..d29440a 100644
--- a/include/gnttab_interface.h
+++ b/include/gnttab_interface.h
@@ -169,6 +169,7 @@ DEFINE_GUID(GUID_XENBUS_GNTTAB_INTERFACE,
/*! \struct _XENBUS_GNTTAB_INTERFACE_V1
\brief GNTTAB interface version 1
+ \ingroup interfaces
*/
struct _XENBUS_GNTTAB_INTERFACE_V1 {
INTERFACE Interface;
diff --git a/include/store_interface.h b/include/store_interface.h
index f052b8f..5bcbba3 100644
--- a/include/store_interface.h
+++ b/include/store_interface.h
@@ -269,6 +269,7 @@ struct _XENBUS_STORE_INTERFACE_V1 {
/*! \struct _XENBUS_STORE_INTERFACE_V1
\brief STORE interface version 1
+ \ingroup interfaces
*/
typedef struct _XENBUS_STORE_INTERFACE_V1 XENBUS_STORE_INTERFACE,
*PXENBUS_STORE_INTERFACE;
diff --git a/include/suspend_interface.h b/include/suspend_interface.h
index 1a39141..df1b4b0 100644
--- a/include/suspend_interface.h
+++ b/include/suspend_interface.h
@@ -148,6 +148,7 @@ DEFINE_GUID(GUID_XENBUS_SUSPEND_INTERFACE,
/*! \struct _XENBUS_SUSPEND_INTERFACE_V1
\brief SUSPEND interface version 1
+ \ingroup interfaces
*/
struct _XENBUS_SUSPEND_INTERFACE_V1 {
INTERFACE Interface;
diff --git a/src/xenvbd/notifier.c b/src/xenvbd/notifier.c
index d299c0c..b812d69 100644
--- a/src/xenvbd/notifier.c
+++ b/src/xenvbd/notifier.c
@@ -125,19 +125,15 @@ NotifierDpc(
return;
}
- for (;;) {
- if (Notifier->Connected)
- FrontendNotifyResponses(Notifier->Frontend);
-
- if (!Notifier->Connected)
- break;
-
- if (!XENBUS_EVTCHN(Unmask,
- Notifier->EvtchnInterface,
- Notifier->Channel,
- FALSE))
- break;
- }
+ if (!Notifier->Connected)
+ return;
+
+ FrontendNotifyResponses(Notifier->Frontend);
+
+ XENBUS_EVTCHN(Unmask,
+ Notifier->EvtchnInterface,
+ Notifier->Channel,
+ FALSE);
}
NTSTATUS
@@ -211,13 +207,10 @@ NotifierConnect(
Notifier->EvtchnInterface,
Notifier->Channel);
- if (XENBUS_EVTCHN(Unmask,
- Notifier->EvtchnInterface,
- Notifier->Channel,
- FALSE))
- XENBUS_EVTCHN(Trigger,
- Notifier->EvtchnInterface,
- Notifier->Channel);
+ XENBUS_EVTCHN(Unmask,
+ Notifier->EvtchnInterface,
+ Notifier->Channel,
+ FALSE);
Notifier->Connected = TRUE;
return STATUS_SUCCESS;
--
2.1.1
_______________________________________________
win-pv-devel mailing list
win-pv-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/win-pv-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |