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

[win-pv-devel] [PATCH] Update GNTTAB interface header



Also updates revision to 09000004

Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx>
---
 include/gnttab_interface.h | 92 +++++++++++++++++++++++++++++++++++++++++++++-
 src/xenvif.inf             |  6 +--
 2 files changed, 93 insertions(+), 5 deletions(-)

diff --git a/include/gnttab_interface.h b/include/gnttab_interface.h
index d29440a..61272ab 100644
--- a/include/gnttab_interface.h
+++ b/include/gnttab_interface.h
@@ -148,6 +148,26 @@ typedef ULONG
     IN  PXENBUS_GNTTAB_ENTRY        Entry
     );
 
+/*! \typedef XENBUS_GNTTAB_QUERY_REFERENCE
+    \brief Get the reference number of the entry
+
+    \param Interface The interface header
+    \param Reference The reference number
+    \param Pfn An optional pointer to receive the value of the reference frame 
number
+    \param ReadOnly An optional pointer to receive the boolean value of the 
read-only flag
+*/
+typedef NTSTATUS
+(*XENBUS_GNTTAB_QUERY_REFERENCE)(
+    IN  PINTERFACE  Interface,
+    IN  ULONG       Reference,
+    OUT PPFN_NUMBER Pfn OPTIONAL,
+    OUT PBOOLEAN    ReadOnly OPTIONAL
+    );
+
+#define XENBUS_GNTTAB_CONSOLE_REFERENCE 0
+#define XENBUS_GNTTAB_STORE_REFERENCE   1
+
+
 /*! \typedef XENBUS_GNTTAB_DESTROY_CACHE
     \brief Destroy a cache of grant table entries
 
@@ -163,6 +183,39 @@ typedef VOID
     IN  PXENBUS_GNTTAB_CACHE    Cache
     );
 
+/*! \typedef XENBUS_GNTTAB_MAP_FOREIGN_PAGES
+    \brief Map foreign memory pages into the system address space
+
+    \param Interface The interface header
+    \param Domain The domid of the foreign domain that granted the pages
+    \param NumberPages Number of pages to map
+    \param References Array of grant reference numbers shared by the foreign 
domain
+    \param ReadOnly If TRUE, pages are mapped with read-only access
+    \param Address The physical address that the foreign pages are mapped under
+*/
+
+typedef NTSTATUS
+(*XENBUS_GNTTAB_MAP_FOREIGN_PAGES)(
+    IN  PINTERFACE              Interface,
+    IN  USHORT                  Domain,
+    IN  ULONG                   NumberPages,
+    IN  PULONG                  References,
+    IN  BOOLEAN                 ReadOnly,
+    OUT PHYSICAL_ADDRESS        *Address
+    );
+
+/*! \typedef XENBUS_GNTTAB_UNMAP_FOREIGN_PAGES
+    \brief Unmap foreign memory pages from the system address space
+
+    \param Interface The interface header
+    \param Address The physical address that the foreign pages are mapped under
+*/
+typedef NTSTATUS
+(*XENBUS_GNTTAB_UNMAP_FOREIGN_PAGES)(
+    IN  PINTERFACE              Interface,
+    IN  PHYSICAL_ADDRESS        Address
+    );
+
 // {763679C5-E5C2-4A6D-8B88-6BB02EC42D8E}
 DEFINE_GUID(GUID_XENBUS_GNTTAB_INTERFACE, 
 0x763679c5, 0xe5c2, 0x4a6d, 0x8b, 0x88, 0x6b, 0xb0, 0x2e, 0xc4, 0x2d, 0x8e);
@@ -182,7 +235,42 @@ struct _XENBUS_GNTTAB_INTERFACE_V1 {
     XENBUS_GNTTAB_DESTROY_CACHE         GnttabDestroyCache;
 };
 
-typedef struct _XENBUS_GNTTAB_INTERFACE_V1 XENBUS_GNTTAB_INTERFACE, 
*PXENBUS_GNTTAB_INTERFACE;
+/*! \struct _XENBUS_GNTTAB_INTERFACE_V2
+    \brief GNTTAB interface version 2
+    \ingroup interfaces
+*/
+struct _XENBUS_GNTTAB_INTERFACE_V2 {
+    INTERFACE                           Interface;
+    XENBUS_GNTTAB_ACQUIRE               GnttabAcquire;
+    XENBUS_GNTTAB_RELEASE               GnttabRelease;
+    XENBUS_GNTTAB_CREATE_CACHE          GnttabCreateCache;
+    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_V3
+    \brief GNTTAB interface version 3
+    \ingroup interfaces
+*/
+struct _XENBUS_GNTTAB_INTERFACE_V3 {
+    INTERFACE                           Interface;
+    XENBUS_GNTTAB_ACQUIRE               GnttabAcquire;
+    XENBUS_GNTTAB_RELEASE               GnttabRelease;
+    XENBUS_GNTTAB_CREATE_CACHE          GnttabCreateCache;
+    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;
+};
+
+typedef struct _XENBUS_GNTTAB_INTERFACE_V3 XENBUS_GNTTAB_INTERFACE, 
*PXENBUS_GNTTAB_INTERFACE;
 
 /*! \def XENBUS_GNTTAB
     \brief Macro at assist in method invocation
@@ -193,7 +281,7 @@ typedef struct _XENBUS_GNTTAB_INTERFACE_V1 
XENBUS_GNTTAB_INTERFACE, *PXENBUS_GNT
 #endif  // _WINDLL
 
 #define XENBUS_GNTTAB_INTERFACE_VERSION_MIN 1
-#define XENBUS_GNTTAB_INTERFACE_VERSION_MAX 1
+#define XENBUS_GNTTAB_INTERFACE_VERSION_MAX 3
 
 #endif  // _XENBUS_GNTTAB_INTERFACE_H
 
diff --git a/src/xenvif.inf b/src/xenvif.inf
index ef4e9bc..a1d9301 100644
--- a/src/xenvif.inf
+++ b/src/xenvif.inf
@@ -59,9 +59,9 @@ 
xenvif_coinst_@MAJOR_VERSION@_@MINOR_VERSION@_@MICRO_VERSION@_@BUILD_NUMBER@.dll
 ; DisplayName          Section         DeviceID
 ; -----------          -------         --------
 
-%XenVifName%           =XenVif_Inst,   
XENBUS\VEN_@VENDOR_PREFIX@@VENDOR_DEVICE_ID@&DEV_VIF&REV_09000003
-%XenVifName%           =XenVif_Inst,   
XENBUS\VEN_@VENDOR_PREFIX@0001&DEV_VIF&REV_09000003
-%XenVifName%           =XenVif_Inst,   
XENBUS\VEN_@VENDOR_PREFIX@0002&DEV_VIF&REV_09000003
+%XenVifName%           =XenVif_Inst,   
XENBUS\VEN_@VENDOR_PREFIX@@VENDOR_DEVICE_ID@&DEV_VIF&REV_09000004
+%XenVifName%           =XenVif_Inst,   
XENBUS\VEN_@VENDOR_PREFIX@0001&DEV_VIF&REV_09000004
+%XenVifName%           =XenVif_Inst,   
XENBUS\VEN_@VENDOR_PREFIX@0002&DEV_VIF&REV_09000004
 
 [XenVif_Inst] 
 CopyFiles=XenVif_Copyfiles
-- 
2.16.2.windows.1


_______________________________________________
win-pv-devel mailing list
win-pv-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/win-pv-devel

 


Rackspace

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