From: Sefano Stabellini Date: Thu, 1 Dec 2011 17:52:01 +0000 (+0000) Subject: xen: don't initialize the RTC timers if xen is available X-Git-Tag: xen-4.2.0-rc1~32 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=13b06e700528;p=qemu-xen-4.2-testing.git xen: don't initialize the RTC timers if xen is available Xen doesn't need full RTC emulation in Qemu because the RTC is already emulated by the hypervisor. Hence don't initialize the RTC timers when Xen is available so that Qemu doesn't need to wake up needlessly. Signed-off-by: Stefano Stabellini --- diff --git a/hw/mc146818rtc.c b/hw/mc146818rtc.c index cb3f56bea..253b680cf 100644 --- a/hw/mc146818rtc.c +++ b/hw/mc146818rtc.c @@ -542,6 +542,7 @@ RTCState *rtc_init(int base, qemu_irq irq, int base_year) s->base_year = base_year; rtc_set_date_from_host(s); +#ifndef CONFIG_DM s->periodic_timer = qemu_new_timer(vm_clock, rtc_periodic_timer, s); s->second_timer = qemu_new_timer(vm_clock, @@ -551,6 +552,7 @@ RTCState *rtc_init(int base, qemu_irq irq, int base_year) s->next_second_time = qemu_get_clock(vm_clock) + (ticks_per_sec * 99) / 100; qemu_mod_timer(s->second_timer2, s->next_second_time); +#endif register_ioport_write(base, 2, 1, cmos_ioport_write, s); register_ioport_read(base, 2, 1, cmos_ioport_read, s);