]> xenbits.xensource.com Git - qemu-xen-4.5-testing.git/commitdiff
suspend_requested -> xen_pause_requested; use shutdown_requested()
authorIan Jackson <iwj@mariner.uk.xensource.com>
Mon, 9 Jun 2008 10:51:45 +0000 (11:51 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Mon, 9 Jun 2008 10:51:45 +0000 (11:51 +0100)
i386-dm/helper2.c
xen-config-host.h
xenstore.c

index 0f1ec91b37434991a7c45910dce6bc44dc92e241..694740e42f28c7b272a175e7b7a4297f2db0aa8a 100644 (file)
@@ -518,7 +518,7 @@ void cpu_handle_ioreq(void *opaque)
          * causes Xen to powerdown the domain.
          */
         if (vm_running) {
-            if (shutdown_requested) {
+            if (qemu_shutdown_requested()) {
                fprintf(logfile, "shutdown requested in cpu_handle_ioreq\n");
                destroy_hvm_domain();
            }
@@ -533,11 +533,11 @@ void cpu_handle_ioreq(void *opaque)
     }
 }
 
+int xen_pause_requested;
+
 int main_loop(void)
 {
     extern int vm_running;
-    extern int shutdown_requested;
-    extern int suspend_requested;
     CPUState *env = cpu_single_env;
     int evtchn_fd = xce_handle == -1 ? -1 : xc_evtchn_fd(xce_handle);
     char *qemu_file;
@@ -552,7 +552,7 @@ int main_loop(void)
 
     xenstore_record_dm_state("running");
     while (1) {
-        while (!(vm_running && suspend_requested))
+        while (!(vm_running && xen_pause_requested))
             /* Wait up to 10 msec. */
             main_loop_wait(10);
 
@@ -571,7 +571,7 @@ int main_loop(void)
         xenstore_record_dm_state("paused");
 
         /* Wait to be allowed to continue */
-        while (suspend_requested) {
+        while (xen_pause_requested) {
             FD_ZERO(&fds);
             FD_SET(xenstore_fd(), &fds);
             if (select(xenstore_fd() + 1, &fds, NULL, NULL, NULL) > 0)
index f51a6a59fcf07664b512df7387b6d6feb3ab1033..3a5da7e119176485eaa14787b49ca17d0b2654bc 100644 (file)
@@ -20,3 +20,4 @@ extern int domid;
 #undef CONFIG_GDBSTUB
 
 extern int xc_handle;
+extern int xen_pause_requested;
index 01ace34ada2d6923520e33efc0e63b46b4569528..b5600f27702c8e4da693093882548c2790ee2f6e 100644 (file)
@@ -8,7 +8,8 @@
  *
  */
 
-#include "vl.h"
+#include "qemu-common.h"
+
 #include "block_int.h"
 #include <unistd.h>
 #ifndef CONFIG_STUBDOM
@@ -462,7 +463,6 @@ static void xenstore_process_dm_command_event(void)
 {
     char *path = NULL, *command = NULL, *par = NULL;
     unsigned int len;
-    extern int suspend_requested;
 
     if (pasprintf(&path, 
                   "/local/domain/0/device-model/%u/command", domid) == -1) {
@@ -475,10 +475,10 @@ static void xenstore_process_dm_command_event(void)
     
     if (!strncmp(command, "save", len)) {
         fprintf(logfile, "dm-command: pause and save state\n");
-        suspend_requested = 1;
+        xen_pause_requested = 1;
     } else if (!strncmp(command, "continue", len)) {
         fprintf(logfile, "dm-command: continue after state save\n");
-        suspend_requested = 0;
+        xen_pause_requested = 0;
     } else if (!strncmp(command, "pci-rem", len)) {
         fprintf(logfile, "dm-command: hot remove pass-through pci dev \n");