|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH] Report reboot required via xenstore
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
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |