debuggers.hg

view tools/ioemu/patches/ioemu-save-restore-timer @ 0:7d21f7218375

Exact replica of unstable on 051908 + README-this
author Mukesh Rathor
date Mon May 19 15:34:57 2008 -0700 (2008-05-19)
parents
children
line source
1 Index: ioemu/vl.c
2 ===================================================================
3 --- ioemu.orig/vl.c 2007-05-03 19:25:11.000000000 +0100
4 +++ ioemu/vl.c 2007-05-03 19:26:37.000000000 +0100
5 @@ -915,10 +915,22 @@
6 #ifdef CONFIG_DM
7 static void timer_save(QEMUFile *f, void *opaque)
8 {
9 + /* need timer for save/restoe qemu_timer in usb_uhci */
10 + if (cpu_ticks_enabled) {
11 + hw_error("cannot save state if virtual timers are running");
12 + }
13 + qemu_put_be64s(f, &cpu_clock_offset);
14 }
16 static int timer_load(QEMUFile *f, void *opaque, int version_id)
17 {
18 + if (version_id != 1)
19 + return -EINVAL;
20 + if (cpu_ticks_enabled) {
21 + return -EINVAL;
22 + }
23 +
24 + qemu_get_be64s(f, &cpu_clock_offset);
25 return 0;
26 }
27 #else /* !CONFIG_DM */