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

[win-pv-devel] [PATCH xenvbd] Update to the new version of the XENFILT_EMULATED interface


  • To: <win-pv-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Paul Durrant <paul.durrant@xxxxxxxxxx>
  • Date: Wed, 2 Oct 2019 13:22:48 +0100
  • Authentication-results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=paul.durrant@xxxxxxxxxx; spf=Pass smtp.mailfrom=Paul.Durrant@xxxxxxxxxx; spf=None smtp.helo=postmaster@xxxxxxxxxxxxxxx
  • Cc: Paul Durrant <paul.durrant@xxxxxxxxxx>
  • Delivery-date: Wed, 02 Oct 2019 12:23:07 +0000
  • Ironport-sdr: /gQq2d2KGbWbylPBsrJE0wAh27Ye1FxnHxigbj0HXC/qs8u1Qv2oHliMUWfDteYLBVJYUMFHNR 1FoZjqQlCqzaNFTAPX779RNIRMVcwnr8nWCuIUZEq3598MNDGAl43Cs3YUTvYyORYwzt9uVAHL Vjbfck5depij6GI5uo2w9abQ62UJuRa1Ju3Oz91hV8pwQty1NpL5YVcdMdU1JxK8E0q7LyeLWX G2Jm5AX/P3aw1x662vhjBBgQyLYPg1VGhyTa/JfQu870Z4m8+ttsCwxq+XMgX23fd5VT0STx2X ny8=
  • List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>

Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx>
---
 include/emulated_interface.h | 38 +++++++++++++++++++++++++++-----------
 src/xenvbd.inf               |  6 +++---
 src/xenvbd/adapter.c         |  4 +---
 3 files changed, 31 insertions(+), 17 deletions(-)

diff --git a/include/emulated_interface.h b/include/emulated_interface.h
index 9361f8d..fe93d72 100644
--- a/include/emulated_interface.h
+++ b/include/emulated_interface.h
@@ -78,22 +78,26 @@ typedef BOOLEAN
     IN  PCHAR   InstanceID OPTIONAL
     );
 
+typedef BOOLEAN
+(*XENFILT_EMULATED_IS_DISK_PRESENT_V1)(
+    IN  PVOID   Context,
+    IN  ULONG   Controller,
+    IN  ULONG   Target,
+    IN  ULONG   Lun
+    );
 /*! \typedef XENFILT_EMULATED_IS_DISK_PRESENT
-    \brief Determine whether a given disk is present in the VM
+    \brief Determine whether a given emulated disk is present in the VM
 
     \param Interface The interface header
-    \param Controller The controller index of the HBA
-    \param Target The target index of the disk
-    \param Lun The Logical Unit Number of the disk within the target
-    \return TRUE if the specified disk is present in the system or
-    FALSE if it is not
+    \param Index The disk number of the paravirtual disk which the
+                 emulated device is aliasing
+    \return TRUE if an emulated disk aliasing the specified paravirtual
+    disk index is present in the system or FALSE if not
 */  
 typedef BOOLEAN
 (*XENFILT_EMULATED_IS_DISK_PRESENT)(
     IN  PVOID   Context,
-    IN  ULONG   Controller,
-    IN  ULONG   Target,
-    IN  ULONG   Lun
+    IN  ULONG   Index
     );
 
 // {959027A1-FCCE-4E78-BCF4-637384F499C5}
@@ -109,10 +113,22 @@ struct _XENFILT_EMULATED_INTERFACE_V1 {
     XENFILT_EMULATED_ACQUIRE            EmulatedAcquire;
     XENFILT_EMULATED_RELEASE            EmulatedRelease;
     XENFILT_EMULATED_IS_DEVICE_PRESENT  EmulatedIsDevicePresent;
+    XENFILT_EMULATED_IS_DISK_PRESENT_V1 EmulatedIsDiskPresentVersion1;
+};
+
+/*! \struct _XENFILT_EMULATED_INTERFACE_V2
+    \brief EMULATED interface version 2
+    \ingroup interfaces
+*/
+struct _XENFILT_EMULATED_INTERFACE_V2 {
+    INTERFACE                           Interface;
+    XENFILT_EMULATED_ACQUIRE            EmulatedAcquire;
+    XENFILT_EMULATED_RELEASE            EmulatedRelease;
+    XENFILT_EMULATED_IS_DEVICE_PRESENT  EmulatedIsDevicePresent;
     XENFILT_EMULATED_IS_DISK_PRESENT    EmulatedIsDiskPresent;
 };
 
-typedef struct _XENFILT_EMULATED_INTERFACE_V1 XENFILT_EMULATED_INTERFACE, 
*PXENFILT_EMULATED_INTERFACE;
+typedef struct _XENFILT_EMULATED_INTERFACE_V2 XENFILT_EMULATED_INTERFACE, 
*PXENFILT_EMULATED_INTERFACE;
 
 /*! \def XENFILT_EMULATED
     \brief Macro at assist in method invocation
@@ -123,7 +139,7 @@ typedef struct _XENFILT_EMULATED_INTERFACE_V1 
XENFILT_EMULATED_INTERFACE, *PXENF
 #endif  // _WINDLL
 
 #define XENFILT_EMULATED_INTERFACE_VERSION_MIN  1
-#define XENFILT_EMULATED_INTERFACE_VERSION_MAX  1
+#define XENFILT_EMULATED_INTERFACE_VERSION_MAX  2
 
 #endif  // _XENFILT_EMULATED_INTERFACE_H
 
diff --git a/src/xenvbd.inf b/src/xenvbd.inf
index 6800d2e..0d575c3 100644
--- a/src/xenvbd.inf
+++ b/src/xenvbd.inf
@@ -54,9 +54,9 @@ xenvbd_coinst.dll=0,,
 %Vendor%=Inst,NT@INF_ARCH@
 
 [Inst.NT@INF_ARCH@]
-%XenVbdName%=XenVbd_Inst,XENBUS\VEN_@VENDOR_PREFIX@@VENDOR_DEVICE_ID@&DEV_VBD&REV_09000004
-%XenVbdName%=XenVbd_Inst,XENBUS\VEN_@VENDOR_PREFIX@0001&DEV_VBD&REV_09000004
-%XenVbdName%=XenVbd_Inst,XENBUS\VEN_@VENDOR_PREFIX@0002&DEV_VBD&REV_09000004
+%XenVbdName%=XenVbd_Inst,XENBUS\VEN_@VENDOR_PREFIX@@VENDOR_DEVICE_ID@&DEV_VBD&REV_09000007
+%XenVbdName%=XenVbd_Inst,XENBUS\VEN_@VENDOR_PREFIX@0001&DEV_VBD&REV_09000007
+%XenVbdName%=XenVbd_Inst,XENBUS\VEN_@VENDOR_PREFIX@0002&DEV_VBD&REV_09000007
 
 [XenVbd_Inst] 
 CopyFiles=XenVbd_Copyfiles
diff --git a/src/xenvbd/adapter.c b/src/xenvbd/adapter.c
index 2d8d65f..14bab4b 100644
--- a/src/xenvbd/adapter.c
+++ b/src/xenvbd/adapter.c
@@ -404,9 +404,7 @@ AdapterIsTargetEmulated(
     // Ask XenFilt if Ctrlr(0), Target(Target), Lun(0) is present
     Emulated = XENFILT_EMULATED(IsDiskPresent,
                                 &Adapter->EmulatedInterface,
-                                0,
-                                TargetId,
-                                0);
+                                TargetId);
 
     XENFILT_EMULATED(Release, &Adapter->EmulatedInterface);
 
-- 
2.5.3


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