[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH xencons] Bring XENBUS interface versions up to date...
From: Paul Durrant <pdurrant@xxxxxxxxxx> ... and update binding accordingly. Signed-off-by: Paul Durrant <pdurrant@xxxxxxxxxx> --- include/cache_interface.h | 34 ++++++++++++++++++++++++++-- include/evtchn_interface.h | 46 +++++++++++++++++++++----------------- include/gnttab_interface.h | 44 ++++++++++++++++++++++++------------ include/store_interface.h | 22 +----------------- src/xencons.inf | 6 ++--- src/xencons/ring.c | 1 + 6 files changed, 92 insertions(+), 61 deletions(-) diff --git a/include/cache_interface.h b/include/cache_interface.h index ac50a82a804f..048e06b3f1c5 100644 --- a/include/cache_interface.h +++ b/include/cache_interface.h @@ -123,6 +123,20 @@ typedef VOID IN PVOID Argument ); +typedef NTSTATUS +(*XENBUS_CACHE_CREATE_V1)( + IN PINTERFACE Interface, + IN const CHAR *Name, + IN ULONG Size, + IN ULONG Reservation, + IN XENBUS_CACHE_CTOR Ctor, + IN XENBUS_CACHE_DTOR Dtor, + IN XENBUS_CACHE_ACQUIRE_LOCK AcquireLock, + IN XENBUS_CACHE_RELEASE_LOCK ReleaseLock, + IN PVOID Argument OPTIONAL, + OUT PXENBUS_CACHE *Cache + ); + /*! \typedef XENBUS_CACHE_CREATE \brief Create a cache of objects of the given \a Size @@ -130,6 +144,7 @@ typedef VOID \param Name A name for the cache which will be used in debug output \param Size The size of each object in bytes \param Reservation The target minimum population of the cache + \param Cap The maximum population of the cache \param Ctor A callback which is invoked when a new object created \param Dtor A callback which is invoked when an object is destroyed \param AcquireLock A callback invoked to acquire a spinlock @@ -146,6 +161,7 @@ typedef NTSTATUS IN const CHAR *Name, IN ULONG Size, IN ULONG Reservation, + IN ULONG Cap, IN XENBUS_CACHE_CTOR Ctor, IN XENBUS_CACHE_DTOR Dtor, IN XENBUS_CACHE_ACQUIRE_LOCK AcquireLock, @@ -208,6 +224,20 @@ DEFINE_GUID(GUID_XENBUS_CACHE_INTERFACE, \ingroup interfaces */ struct _XENBUS_CACHE_INTERFACE_V1 { + INTERFACE Interface; + XENBUS_CACHE_ACQUIRE CacheAcquire; + XENBUS_CACHE_RELEASE CacheRelease; + XENBUS_CACHE_CREATE_V1 CacheCreateVersion1; + XENBUS_CACHE_GET CacheGet; + XENBUS_CACHE_PUT CachePut; + XENBUS_CACHE_DESTROY CacheDestroy; +}; + +/*! \struct _XENBUS_CACHE_INTERFACE_V2 + \brief CACHE interface version 1 + \ingroup interfaces +*/ +struct _XENBUS_CACHE_INTERFACE_V2 { INTERFACE Interface; XENBUS_CACHE_ACQUIRE CacheAcquire; XENBUS_CACHE_RELEASE CacheRelease; @@ -217,7 +247,7 @@ struct _XENBUS_CACHE_INTERFACE_V1 { XENBUS_CACHE_DESTROY CacheDestroy; }; -typedef struct _XENBUS_CACHE_INTERFACE_V1 XENBUS_CACHE_INTERFACE, *PXENBUS_CACHE_INTERFACE; +typedef struct _XENBUS_CACHE_INTERFACE_V2 XENBUS_CACHE_INTERFACE, *PXENBUS_CACHE_INTERFACE; /*! \def XENBUS_CACHE \brief Macro at assist in method invocation @@ -228,6 +258,6 @@ typedef struct _XENBUS_CACHE_INTERFACE_V1 XENBUS_CACHE_INTERFACE, *PXENBUS_CACHE #endif // _WINDLL #define XENBUS_CACHE_INTERFACE_VERSION_MIN 1 -#define XENBUS_CACHE_INTERFACE_VERSION_MAX 1 +#define XENBUS_CACHE_INTERFACE_VERSION_MAX 2 #endif // _XENBUS_CACHE_INTERFACE_H diff --git a/include/evtchn_interface.h b/include/evtchn_interface.h index 3f881bb86257..dbe874511866 100644 --- a/include/evtchn_interface.h +++ b/include/evtchn_interface.h @@ -100,6 +100,8 @@ typedef VOID \b VIRQ: \param Index The index number of the VIRQ + \param Group The group number of the CPU that should handle the VIRQ + \param Number The relative number of the CPU that should handle the VIRQ \return Event channel handle */ @@ -141,7 +143,7 @@ typedef VOID \param Interface The interface header \param Channel The channel handle \param InCallback Set to TRUE if this method is invoked in context of the channel callback - \param Force Set to TRUE if the unmask must succeed, otherwise set to FALSE and the function will return FALSE if the unmask did not complete. + \param Force Set to TRUE if the unmask must succeed, otherwise set to FALSE and the function will return TRUE if the unmask did not complete and there is still an event pending. */ typedef BOOLEAN (*XENBUS_EVTCHN_UNMASK)( @@ -249,23 +251,6 @@ typedef VOID DEFINE_GUID(GUID_XENBUS_EVTCHN_INTERFACE, 0xbe2440ac, 0x1098, 0x4150, 0xaf, 0x4d, 0x45, 0x2f, 0xad, 0xce, 0xf9, 0x23); -/*! \struct _XENBUS_EVTCHN_INTERFACE_V4 - \brief EVTCHN interface version 4 - \ingroup interfaces -*/ -struct _XENBUS_EVTCHN_INTERFACE_V4 { - INTERFACE Interface; - XENBUS_EVTCHN_ACQUIRE EvtchnAcquire; - XENBUS_EVTCHN_RELEASE EvtchnRelease; - XENBUS_EVTCHN_OPEN EvtchnOpen; - XENBUS_EVTCHN_BIND EvtchnBind; - XENBUS_EVTCHN_UNMASK_V4 EvtchnUnmaskVersion4; - XENBUS_EVTCHN_SEND_V1 EvtchnSendVersion1; - XENBUS_EVTCHN_TRIGGER EvtchnTrigger; - XENBUS_EVTCHN_GET_PORT EvtchnGetPort; - XENBUS_EVTCHN_CLOSE EvtchnClose; -}; - /*! \struct _XENBUS_EVTCHN_INTERFACE_V5 \brief EVTCHN interface version 5 \ingroup interfaces @@ -340,7 +325,26 @@ struct _XENBUS_EVTCHN_INTERFACE_V8 { XENBUS_EVTCHN_CLOSE EvtchnClose; }; -typedef struct _XENBUS_EVTCHN_INTERFACE_V8 XENBUS_EVTCHN_INTERFACE, *PXENBUS_EVTCHN_INTERFACE; +/*! \struct _XENBUS_EVTCHN_INTERFACE_V9 + \brief EVTCHN interface version 9 + \ingroup interfaces +*/ +struct _XENBUS_EVTCHN_INTERFACE_V9 { + 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_TRIGGER EvtchnTrigger; + XENBUS_EVTCHN_GET_COUNT EvtchnGetCount; + XENBUS_EVTCHN_WAIT EvtchnWait; + XENBUS_EVTCHN_GET_PORT EvtchnGetPort; + XENBUS_EVTCHN_CLOSE EvtchnClose; +}; + +typedef struct _XENBUS_EVTCHN_INTERFACE_V9 XENBUS_EVTCHN_INTERFACE, *PXENBUS_EVTCHN_INTERFACE; /*! \def XENBUS_EVTCHN \brief Macro at assist in method invocation @@ -350,7 +354,7 @@ typedef struct _XENBUS_EVTCHN_INTERFACE_V8 XENBUS_EVTCHN_INTERFACE, *PXENBUS_EVT #endif // _WINDLL -#define XENBUS_EVTCHN_INTERFACE_VERSION_MIN 4 -#define XENBUS_EVTCHN_INTERFACE_VERSION_MAX 8 +#define XENBUS_EVTCHN_INTERFACE_VERSION_MIN 5 +#define XENBUS_EVTCHN_INTERFACE_VERSION_MAX 9 #endif // _XENBUS_EVTCHN_INTERFACE_H diff --git a/include/gnttab_interface.h b/include/gnttab_interface.h index f4ad413b8095..865c4f302444 100644 --- a/include/gnttab_interface.h +++ b/include/gnttab_interface.h @@ -72,12 +72,24 @@ typedef VOID IN PINTERFACE Interface ); +typedef NTSTATUS +(*XENBUS_GNTTAB_CREATE_CACHE_V1)( + IN PINTERFACE Interface, + IN const CHAR *Name, + IN ULONG Reservation, + IN XENBUS_CACHE_ACQUIRE_LOCK AcquireLock, + IN XENBUS_CACHE_RELEASE_LOCK ReleaseLock, + IN PVOID Argument OPTIONAL, + OUT PXENBUS_GNTTAB_CACHE *Cache + ); + /*! \typedef XENBUS_GNTTAB_CREATE_CACHE \brief Create a cache of grant table entries \param Interface The interface header \param Name A name for the cache which will be used in debug output \param Reservation The target minimum population of the cache + \param Cap The maximum population of the cache \param AcquireLock A callback invoked to acquire a spinlock \param ReleaseLock A callback invoked to release the spinlock \param Argument An optional context argument passed to the callbacks @@ -88,6 +100,7 @@ typedef NTSTATUS IN PINTERFACE Interface, IN const CHAR *Name, IN ULONG Reservation, + IN ULONG Cap, IN XENBUS_CACHE_ACQUIRE_LOCK AcquireLock, IN XENBUS_CACHE_RELEASE_LOCK ReleaseLock, IN PVOID Argument OPTIONAL, @@ -220,43 +233,46 @@ typedef NTSTATUS DEFINE_GUID(GUID_XENBUS_GNTTAB_INTERFACE, 0x763679c5, 0xe5c2, 0x4a6d, 0x8b, 0x88, 0x6b, 0xb0, 0x2e, 0xc4, 0x2d, 0x8e); -/*! \struct _XENBUS_GNTTAB_INTERFACE_V1 - \brief GNTTAB interface version 1 +/*! \struct _XENBUS_GNTTAB_INTERFACE_V2 + \brief GNTTAB interface version 2 \ingroup interfaces */ -struct _XENBUS_GNTTAB_INTERFACE_V1 { +struct _XENBUS_GNTTAB_INTERFACE_V2 { INTERFACE Interface; XENBUS_GNTTAB_ACQUIRE GnttabAcquire; XENBUS_GNTTAB_RELEASE GnttabRelease; - XENBUS_GNTTAB_CREATE_CACHE GnttabCreateCache; + XENBUS_GNTTAB_CREATE_CACHE_V1 GnttabCreateCacheVersion1; XENBUS_GNTTAB_PERMIT_FOREIGN_ACCESS GnttabPermitForeignAccess; XENBUS_GNTTAB_REVOKE_FOREIGN_ACCESS GnttabRevokeForeignAccess; XENBUS_GNTTAB_GET_REFERENCE GnttabGetReference; XENBUS_GNTTAB_DESTROY_CACHE GnttabDestroyCache; + XENBUS_GNTTAB_MAP_FOREIGN_PAGES GnttabMapForeignPages; + XENBUS_GNTTAB_UNMAP_FOREIGN_PAGES GnttabUnmapForeignPages; }; -/*! \struct _XENBUS_GNTTAB_INTERFACE_V2 - \brief GNTTAB interface version 2 +/*! \struct _XENBUS_GNTTAB_INTERFACE_V3 + \brief GNTTAB interface version 3 \ingroup interfaces */ -struct _XENBUS_GNTTAB_INTERFACE_V2 { +struct _XENBUS_GNTTAB_INTERFACE_V3 { INTERFACE Interface; XENBUS_GNTTAB_ACQUIRE GnttabAcquire; XENBUS_GNTTAB_RELEASE GnttabRelease; - XENBUS_GNTTAB_CREATE_CACHE GnttabCreateCache; + XENBUS_GNTTAB_CREATE_CACHE_V1 GnttabCreateCacheVersion1; XENBUS_GNTTAB_PERMIT_FOREIGN_ACCESS GnttabPermitForeignAccess; XENBUS_GNTTAB_REVOKE_FOREIGN_ACCESS GnttabRevokeForeignAccess; XENBUS_GNTTAB_GET_REFERENCE GnttabGetReference; + XENBUS_GNTTAB_QUERY_REFERENCE GnttabQueryReference; XENBUS_GNTTAB_DESTROY_CACHE GnttabDestroyCache; XENBUS_GNTTAB_MAP_FOREIGN_PAGES GnttabMapForeignPages; XENBUS_GNTTAB_UNMAP_FOREIGN_PAGES GnttabUnmapForeignPages; }; -/*! \struct _XENBUS_GNTTAB_INTERFACE_V3 - \brief GNTTAB interface version 3 +/*! \struct _XENBUS_GNTTAB_INTERFACE_V4 + \brief GNTTAB interface version 4 \ingroup interfaces */ -struct _XENBUS_GNTTAB_INTERFACE_V3 { +struct _XENBUS_GNTTAB_INTERFACE_V4 { INTERFACE Interface; XENBUS_GNTTAB_ACQUIRE GnttabAcquire; XENBUS_GNTTAB_RELEASE GnttabRelease; @@ -270,7 +286,7 @@ struct _XENBUS_GNTTAB_INTERFACE_V3 { XENBUS_GNTTAB_UNMAP_FOREIGN_PAGES GnttabUnmapForeignPages; }; -typedef struct _XENBUS_GNTTAB_INTERFACE_V3 XENBUS_GNTTAB_INTERFACE, *PXENBUS_GNTTAB_INTERFACE; +typedef struct _XENBUS_GNTTAB_INTERFACE_V4 XENBUS_GNTTAB_INTERFACE, *PXENBUS_GNTTAB_INTERFACE; /*! \def XENBUS_GNTTAB \brief Macro at assist in method invocation @@ -280,7 +296,7 @@ typedef struct _XENBUS_GNTTAB_INTERFACE_V3 XENBUS_GNTTAB_INTERFACE, *PXENBUS_GNT #endif // _WINDLL -#define XENBUS_GNTTAB_INTERFACE_VERSION_MIN 1 -#define XENBUS_GNTTAB_INTERFACE_VERSION_MAX 3 +#define XENBUS_GNTTAB_INTERFACE_VERSION_MIN 2 +#define XENBUS_GNTTAB_INTERFACE_VERSION_MAX 4 #endif // _XENBUS_GNTTAB_INTERFACE_H diff --git a/include/store_interface.h b/include/store_interface.h index f2b2147d5b3b..83fed17afffc 100644 --- a/include/store_interface.h +++ b/include/store_interface.h @@ -290,26 +290,6 @@ typedef NTSTATUS DEFINE_GUID(GUID_XENBUS_STORE_INTERFACE, 0x86824c3b, 0xd34e, 0x4753, 0xb2, 0x81, 0x2f, 0x1e, 0x3a, 0xd2, 0x14, 0xd7); -/*! \struct _XENBUS_STORE_INTERFACE_V1 - \brief STORE interface version 1 - \ingroup interfaces -*/ -struct _XENBUS_STORE_INTERFACE_V1 { - INTERFACE Interface; - XENBUS_STORE_ACQUIRE StoreAcquire; - XENBUS_STORE_RELEASE StoreRelease; - XENBUS_STORE_FREE StoreFree; - XENBUS_STORE_READ StoreRead; - XENBUS_STORE_PRINTF StorePrintf; - XENBUS_STORE_REMOVE StoreRemove; - XENBUS_STORE_DIRECTORY StoreDirectory; - XENBUS_STORE_TRANSACTION_START StoreTransactionStart; - XENBUS_STORE_TRANSACTION_END StoreTransactionEnd; - XENBUS_STORE_WATCH_ADD StoreWatchAdd; - XENBUS_STORE_WATCH_REMOVE StoreWatchRemove; - XENBUS_STORE_POLL StorePoll; -}; - /*! \struct _XENBUS_STORE_INTERFACE_V2 \brief STORE interface version 2 \ingroup interfaces @@ -341,7 +321,7 @@ typedef struct _XENBUS_STORE_INTERFACE_V2 XENBUS_STORE_INTERFACE, *PXENBUS_STORE #endif // _WINDLL -#define XENBUS_STORE_INTERFACE_VERSION_MIN 1 +#define XENBUS_STORE_INTERFACE_VERSION_MIN 2 #define XENBUS_STORE_INTERFACE_VERSION_MAX 2 #endif // _XENBUS_STORE_INTERFACE_H diff --git a/src/xencons.inf b/src/xencons.inf index 606ef393e045..5eab17f53401 100644 --- a/src/xencons.inf +++ b/src/xencons.inf @@ -71,9 +71,9 @@ xencons_tty_@MAJOR_VERSION@_@MINOR_VERSION@_@MICRO_VERSION@_@BUILD_NUMBER@.exe,x ; DisplayName Section DeviceID ; ----------- ------- -------- -%XenConsName% =XenCons_Inst, XENBUS\VEN_@VENDOR_PREFIX@@VENDOR_DEVICE_ID@&DEV_CONS&REV_09000000 -%XenConsName% =XenCons_Inst, XENBUS\VEN_@VENDOR_PREFIX@0001&DEV_CONS&REV_09000000 -%XenConsName% =XenCons_Inst, XENBUS\VEN_@VENDOR_PREFIX@0002&DEV_CONS&REV_09000000 +%XenConsName% =XenCons_Inst, XENBUS\VEN_@VENDOR_PREFIX@@VENDOR_DEVICE_ID@&DEV_CONS&REV_09000009 +%XenConsName% =XenCons_Inst, XENBUS\VEN_@VENDOR_PREFIX@0001&DEV_CONS&REV_09000009 +%XenConsName% =XenCons_Inst, XENBUS\VEN_@VENDOR_PREFIX@0002&DEV_CONS&REV_09000009 [XenCons_Inst] CopyFiles=XenCons_Copyfiles diff --git a/src/xencons/ring.c b/src/xencons/ring.c index e6e4f2c17c81..c4f01225c8bd 100644 --- a/src/xencons/ring.c +++ b/src/xencons/ring.c @@ -709,6 +709,7 @@ RingConnect( &Ring->GnttabInterface, Name, 0, + 0, RingAcquireLock, RingReleaseLock, Ring, -- 2.17.1
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |