From: Arun Sharma <arun.sharma@intel.com>
To: Ian Pratt <Ian.Pratt@cl.cam.ac.uk>,
Keir Fraser <Keir.Fraser@cl.cam.ac.uk>
Cc: xen-devel@lists.xensource.com
Subject: [PATCH][VT][7/15] Support rebooting VMX domains
Date: Thu, 11 Aug 2005 12:24:23 -0700 [thread overview]
Message-ID: <20050811192423.GA15291@intel.com> (raw)
Support rebooting VMX domains
Signed-off-by: Ke Yu <ke.yu@intel.com>
Signed-off-by: Arun Sharma <arun.sharma@intel.com>
diff -r 4f2364097bd4 -r 6fb4a79e9f7a tools/ioemu/target-i386-dm/helper2.c
--- a/tools/ioemu/target-i386-dm/helper2.c Tue Aug 9 19:06:44 2005
+++ b/tools/ioemu/target-i386-dm/helper2.c Tue Aug 9 19:06:44 2005
@@ -55,6 +55,7 @@
#include "vl.h"
shared_iopage_t *shared_page = NULL;
+extern int reset_requested;
CPUX86State *cpu_86_init(void)
{
@@ -349,6 +350,10 @@
if (shutdown_requested) {
break;
}
+ if (reset_requested){
+ qemu_system_reset();
+ reset_requested = 0;
+ }
}
/* Wait up to one seconds. */
@@ -394,13 +399,26 @@
return 0;
}
+static void
+qemu_vmx_reset(void *unused)
+{
+ char cmd[255];
+ extern int domid;
+
+ /* pause domain first, to avoid repeated reboot request*/
+ xc_domain_pause (xc_handle, domid);
+
+ sprintf(cmd,"xm shutdown -R %d", domid);
+ system (cmd);
+}
+
CPUState *
cpu_init()
{
CPUX86State *env;
cpu_exec_init();
-
+ qemu_register_reset(qemu_vmx_reset, NULL);
env = malloc(sizeof(CPUX86State));
if (!env)
return NULL;
@@ -427,3 +445,4 @@
return env;
}
+
diff -r 4f2364097bd4 -r 6fb4a79e9f7a tools/ioemu/vl.c
--- a/tools/ioemu/vl.c Tue Aug 9 19:06:44 2005
+++ b/tools/ioemu/vl.c Tue Aug 9 19:06:44 2005
@@ -2030,7 +2030,7 @@
} QEMUResetEntry;
static QEMUResetEntry *first_reset_entry;
-static int reset_requested;
+int reset_requested;
int shutdown_requested;
void qemu_register_reset(QEMUResetHandler *func, void *opaque)
diff -r 4f2364097bd4 -r 6fb4a79e9f7a tools/ioemu/vl.h
--- a/tools/ioemu/vl.h Tue Aug 9 19:06:44 2005
+++ b/tools/ioemu/vl.h Tue Aug 9 19:06:44 2005
@@ -107,6 +107,7 @@
void qemu_register_reset(QEMUResetHandler *func, void *opaque);
void qemu_system_reset_request(void);
+void qemu_system_reset(void);
void qemu_system_shutdown_request(void);
void main_loop_wait(int timeout);
reply other threads:[~2005-08-11 19:24 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050811192423.GA15291@intel.com \
--to=arun.sharma@intel.com \
--cc=Ian.Pratt@cl.cam.ac.uk \
--cc=Keir.Fraser@cl.cam.ac.uk \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.