[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] Support rebooting VMX domains
# HG changeset patch # User adsharma@xxxxxxxxxxxxxxxxxxxx # Node ID 6fb4a79e9f7a680ce76dae3000562b9367421134 # Parent 4f2364097bd4d17d615f0e24d866aee9c4c44e84 Support rebooting VMX domains Signed-off-by: Ke Yu <ke.yu@xxxxxxxxx> Signed-off-by: Arun Sharma <arun.sharma@xxxxxxxxx> 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); _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |