[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:38:45 +0000
  • Authentication-results: esa6.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:39:15 +0000
  • Ironport-sdr: KR5NeYBQVaudgHpY2pAtK9UM153XtSvwtLYpXAaNqdDb3MUIBBxfWy+GYAZ8Hfbp/sN4mq30dS FK27AXBIkXALuZQke1q8vJ9Jy/dGtZRZRHJGKTw4WMWdLHaMaTB1n436xtEH/4tM50v0s8s9nG XzKK0AUzV9VSRuz9KCJmtZwXO078Y429fnj8KwogJRvXmPatLg1jE0F1MI4GLvjwJwcym433xH OOyI3cY6MSHAMqf82EpjiLDcm88SNE+b/6cpX+XLlHC3tMgSNbSf8rLT0f+YjswFrKdo9tD5zm adE=
  • 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/xenvbd/adapter.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/xenvbd/adapter.c b/src/xenvbd/adapter.c
index 5e20944..de78ac0 100644
--- a/src/xenvbd/adapter.c
+++ b/src/xenvbd/adapter.c
@@ -501,8 +501,15 @@ __AdapterEnumerate(
 
     if (NeedInvalidate)
         AdapterTargetListChanged(Adapter);
-    if (NeedReboot)
+    if (NeedReboot) {
+        (VOID) XENBUS_STORE(Printf,
+                            &Adapter->StoreInterface,
+                            NULL,
+                            "feature/reboot-required",
+                            "xenvbd",
+                            "1");
         DriverRequestReboot();
+    }
 }
 
 static DECLSPEC_NOINLINE NTSTATUS
-- 
2.16.2.windows.1




 


Rackspace

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