[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] Support rebooting VMX domains
# HG changeset patch # User kaf24@xxxxxxxxxxxxxxxxxxxx # Node ID 2b9e3795a5235e601d2ca6f300096efa7f375bf9 # Parent fb619858dfa91cc306f4c0b5cf2c2e8a2fb71fca Support rebooting VMX domains Signed-off-by: Ke Yu <ke.yu@xxxxxxxxx> Signed-off-by: Arun Sharma <arun.sharma@xxxxxxxxx> diff -r fb619858dfa9 -r 2b9e3795a523 tools/ioemu/target-i386-dm/helper2.c --- a/tools/ioemu/target-i386-dm/helper2.c Thu Aug 11 21:02:51 2005 +++ b/tools/ioemu/target-i386-dm/helper2.c Thu Aug 11 21:03:16 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 fb619858dfa9 -r 2b9e3795a523 tools/ioemu/vl.c --- a/tools/ioemu/vl.c Thu Aug 11 21:02:51 2005 +++ b/tools/ioemu/vl.c Thu Aug 11 21:03:16 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 fb619858dfa9 -r 2b9e3795a523 tools/ioemu/vl.h --- a/tools/ioemu/vl.h Thu Aug 11 21:02:51 2005 +++ b/tools/ioemu/vl.h Thu Aug 11 21:03:16 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); _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |