Patchwork [v7,03/18] apic: Stop timer on reset

login
register
mail settings
Submitter Jan Kiszka
Date Jan. 16, 2012, 3:55 p.m.
Message ID <e5fcf61b274e948e8edc9a5be35a12ecde019154.1326729350.git.jan.kiszka@siemens.com>
Download mbox | patch
Permalink /patch/136293/
State New
Headers show

Comments

Jan Kiszka - Jan. 16, 2012, 3:55 p.m.
All LVTs are masked on reset, so the timer becomes ineffective. Letting
it tick nevertheless is harmless, but will at least create a spurious
trace event.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 hw/apic.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Patch

diff --git a/hw/apic.c b/hw/apic.c
index 9d0f460..4b97b17 100644
--- a/hw/apic.c
+++ b/hw/apic.c
@@ -528,6 +528,8 @@  void apic_init_reset(DeviceState *d)
     s->initial_count_load_time = 0;
     s->next_time = 0;
     s->wait_for_sipi = 1;
+
+    qemu_del_timer(s->timer);
 }
 
 static void apic_startup(APICState *s, int vector_num)