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

[PATCH 2/3] Add logging for XenFilt AddDevice.


  • To: <win-pv-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Martin Harvey <Martin.Harvey@xxxxxxxxxx>
  • Date: Thu, 15 Jul 2021 14:15:01 +0100
  • Authentication-results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Martin Harvey <Martin.Harvey@xxxxxxxxxx>, Martin Harvey <martin.harvey@xxxxxxxxxx>
  • Delivery-date: Thu, 15 Jul 2021 13:15:36 +0000
  • Ironport-hdrordr: A9a23:19tku6+ssXdVBH2Fb9tuk+DiI+orL9Y04lQ7vn2YSXRuE/Bw8P re5cjztCWE8wr5N0tQ+uxoVJPufZqYz+8Q3WBzB8bFYOCFghrLEGgK1+KLqFeMdxEWtNQtsp uIG5IOcOEYZmIbsS+V2meF+q4bsby6zJw=
  • Ironport-sdr: UMWck0lca3cOwKGf2eaQnLyTKPvxr+BlnBO+0rlF5p82zmUud2Ro5m8VEXA5fLW0DxHZN4FvLf 9kRxYw7FfHaKjYHDZf9ywewtU5eu+t8wXGkGHpnlsmuxi4lPfcL3M8Cko1Zx+1FfNQyGBwp0HI qGSg5Lj6YK9kwk1Bh29G3dNfIf87ivpb502zqzlLr8GNp+pRAZoBOohzFzG5CkjY7L3cMLJ7bw +mGYg2rcgBBM8kMJtrwwspHl/KMG07ioEBBoXCJ1LCVvjuPTspdRAttmH799u0qdrnGeKnna/I ihs=
  • List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>

Recent releases of Windows (10 and 11 in particular) allow
online edition updates which involve a driver migration step,
which occurs in SAFEBOOT mode.

In some rare cases, this step may fail (for a variety of reasons).
This additional logging added to debug such upgrade cases.

Signed-Off-By: Martin Harvey <martin.harvey@xxxxxxxxxx>
---
 src/xenfilt/driver.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/src/xenfilt/driver.c b/src/xenfilt/driver.c
index e9e6673..f131282 100644
--- a/src/xenfilt/driver.c
+++ b/src/xenfilt/driver.c
@@ -723,6 +723,19 @@ fail1:
     return status;
 }
 
+static FORCEINLINE PCHAR
+__EmulatedTypeName(
+    IN  XENFILT_EMULATED_OBJECT_TYPE    Type
+    )
+{
+    switch (Type) {
+    case XENFILT_EMULATED_OBJECT_TYPE_UNKNOWN:  return "UNKNOWN";
+    case XENFILT_EMULATED_OBJECT_TYPE_PCI:      return "PCI";
+    case XENFILT_EMULATED_OBJECT_TYPE_IDE:      return "IDE";
+    default:                                    return "InvalidType";
+    }
+}
+
 static XENFILT_EMULATED_OBJECT_TYPE
 DriverGetEmulatedType(
     IN  PCHAR                       Id
@@ -804,6 +817,10 @@ DriverAddDevice(
         }
     }
 
+    Info("%p %s\n",
+         PhysicalDeviceObject,
+         __EmulatedTypeName(Type));
+
     status = STATUS_SUCCESS;
     if (Type == XENFILT_EMULATED_OBJECT_TYPE_UNKNOWN)
         goto done;
-- 
2.25.0.windows.1




 


Rackspace

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