* 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();
}
}
}
+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;
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);
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)
*
*/
-#include "vl.h"
+#include "qemu-common.h"
+
#include "block_int.h"
#include <unistd.h>
#ifndef CONFIG_STUBDOM
{
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) {
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");