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

[PATCH] Report reboot required via xenstore


  • To: <win-pv-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Owen Smith <owen.smith@xxxxxxxxxx>
  • Date: Wed, 19 Aug 2020 07:37:30 +0000
  • Authentication-results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Owen Smith <owen.smith@xxxxxxxxxx>
  • Delivery-date: Wed, 19 Aug 2020 07:38:03 +0000
  • Ironport-sdr: EZcJ1Mj4J02pIxDN3jNmQ+rE/bBb4BO2uQpfvFd2JbUtvah3vhz68GFsIXbptn5rTq7nRVExUu XKPMr18msq3k3YHYcrB+NVr/NKIrjCkQlgYAJgdKtpcvNbhfU87izZspqkYZQMSRB/fbvXrErP mpG+cnodPasSAGXb/1uBS68q0vp9U253kMPRD4+IHkj5at1YnXRQaFtGC3+Du7PTzLFCX6aQxM RM3DPCKVxxLi6Ad7lqLUff2AONqEmMAZU/YAa86++HrEMBR4L3ORPSaq0qqXmZx7AAHdwOztgn SHM=
  • List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>

Report if the driver requires a reboot to xenstore, so that the
toolstack can detect if a driver requires a reboot. This is useful if
drivers are delivered by Windows Update, or another hands-free method,
that does not correctly manage reboots and the popup provided by
xenbus_monitor is not sufficient to guarantee the reboot is visible
(i.e. the VM is being run as a headless server without a visible user
session)

Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx>
---
 src/xenvif/fdo.c | 13 +++++++++++++
 src/xenvif/fdo.h |  5 +++++
 src/xenvif/pdo.c |  1 +
 3 files changed, 19 insertions(+)

diff --git a/src/xenvif/fdo.c b/src/xenvif/fdo.c
index 896107c..ed31fea 100644
--- a/src/xenvif/fdo.c
+++ b/src/xenvif/fdo.c
@@ -714,6 +714,19 @@ FdoReleaseMutex(
         FdoDestroy(Fdo);
 }
 
+VOID
+FdoInformRebootRequired(
+    IN  PXENVIF_FDO     Fdo
+    )
+{
+    (VOID) XENBUS_STORE(Printf,
+                        &Fdo->StoreInterface,
+                        NULL,
+                        "feature/reboot-required",
+                        "vif",
+                        "1");
+}
+
 static FORCEINLINE BOOLEAN
 __FdoEnumerate(
     IN  PXENVIF_FDO     Fdo,
diff --git a/src/xenvif/fdo.h b/src/xenvif/fdo.h
index 23f07cb..74d2997 100644
--- a/src/xenvif/fdo.h
+++ b/src/xenvif/fdo.h
@@ -77,6 +77,11 @@ FdoReleaseMutex(
     IN  PXENVIF_FDO     Fdo
     );
 
+extern VOID
+FdoInformRebootRequired(
+    IN  PXENVIF_FDO     Fdo
+    );
+
 extern PDEVICE_OBJECT
 FdoGetPhysicalDeviceObject(
     IN  PXENVIF_FDO Fdo
diff --git a/src/xenvif/pdo.c b/src/xenvif/pdo.c
index e6ffbc3..cc833cd 100644
--- a/src/xenvif/pdo.c
+++ b/src/xenvif/pdo.c
@@ -1371,6 +1371,7 @@ fail10:
 fail9:
     Error("fail9\n");
 
+    FdoInformRebootRequired(__PdoGetFdo(Pdo));
     DriverRequestReboot();
     __FreeMibTable(Table);
 
-- 
2.16.2.windows.1




 


Rackspace

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