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

[PATCH xenbus 1/7] Move HypercallInitialize() earlier



From: Paul Durrant <pdurrant@xxxxxxxxxx>

A subsequent patch will add code called from SystemInitialize() that will need
to make hypercalls.

NOTE: There is a missing code to AcpiTeardown() in DllUnload() which is
      also fixed by this patch.

Signed-off-by: Paul Durrant <pdurrant@xxxxxxxxxx>
---
 src/xen/driver.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/src/xen/driver.c b/src/xen/driver.c
index fe638d74b147..9e4a18ef7dfd 100644
--- a/src/xen/driver.c
+++ b/src/xen/driver.c
@@ -249,6 +249,8 @@ DllInitialize(
 
     __DriverSetUnplugKey(UnplugKey);
 
+    HypercallInitialize();
+
     status = AcpiInitialize();
     if (!NT_SUCCESS(status))
         goto fail6;
@@ -257,8 +259,6 @@ DllInitialize(
     if (!NT_SUCCESS(status))
         goto fail7;
 
-    HypercallInitialize();
-
     status = BugCheckInitialize();
     if (!NT_SUCCESS(status))
         goto fail8;
@@ -298,8 +298,6 @@ fail9:
 
     BugCheckTeardown();
 
-    HypercallTeardown();
-
 fail8:
     Error("fail8\n");
 
@@ -313,6 +311,8 @@ fail7:
 fail6:
     Error("fail6\n");
 
+    HypercallTeardown();
+
     RegistryCloseKey(UnplugKey);
     __DriverSetUnplugKey(NULL);
 
@@ -367,10 +367,12 @@ DllUnload(
 
     BugCheckTeardown();
 
-    HypercallTeardown();
-
     SystemTeardown();
 
+    AcpiTeardown();
+
+    HypercallTeardown();
+
     UnplugKey = __DriverGetUnplugKey();
 
     RegistryCloseKey(UnplugKey);
-- 
2.17.1




 


Rackspace

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