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

[win-pv-devel] [PATCH] Re-register DbgPrint callback on resume from S4



Windows seems to lose knowledge of the callback when it cycles into and
out of S4 so we need to re-register.

Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx>
---
 include/xen.h    |  6 ++++++
 src/xen/log.c    | 18 +++++++++++++++++-
 src/xenbus/fdo.c |  2 ++
 3 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/include/xen.h b/include/xen.h
index f03635f..c8a8e4c 100644
--- a/include/xen.h
+++ b/include/xen.h
@@ -397,6 +397,12 @@ LogPrintf(
     ...
     );
 
+XEN_API
+VOID
+LogResume(
+    VOID
+    );
+
 // SYSTEM
 
 XEN_API
diff --git a/src/xen/log.c b/src/xen/log.c
index f819a7e..ff8b091 100644
--- a/src/xen/log.c
+++ b/src/xen/log.c
@@ -649,9 +649,25 @@ done:
     return Enable;
 }
 
+XEN_API
+VOID
+LogResume(
+    VOID
+    )
+{
+    PLOG_CONTEXT    Context = &LogContext;
+
+    if (!Context->Enabled)
+        return;
+
+    (VOID) DbgSetDebugPrintCallback(LogDebugPrint, FALSE);
+    (VOID) DbgSetDebugPrintCallback(LogDebugPrint, TRUE);
+}
+
 NTSTATUS
 LogInitialize(
-    VOID)
+    VOID
+    )
 {
     PLOG_CONTEXT    Context = &LogContext;
     ULONG           References;
diff --git a/src/xenbus/fdo.c b/src/xenbus/fdo.c
index ce4d4ac..34aee14 100644
--- a/src/xenbus/fdo.c
+++ b/src/xenbus/fdo.c
@@ -3188,6 +3188,8 @@ FdoS4ToS3(
     if (!__FdoIsActive(Fdo))
         goto not_active;
 
+    LogResume();
+
     HypercallPopulate();
 
     UnplugDevices();
-- 
2.1.1


_______________________________________________
win-pv-devel mailing list
win-pv-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/cgi-bin/mailman/listinfo/win-pv-devel

 


Rackspace

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