From: <stefano.stabellini@eu.citrix.com>
To: xen-devel@lists.xensource.com
Cc: Ian.Jackson@eu.citrix.com,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: [PATCH 2/3] xen: don't initialize the RTC timers if xen is available
Date: Fri, 18 Nov 2011 14:05:24 +0000 [thread overview]
Message-ID: <1321625125-30726-2-git-send-email-stefano.stabellini@eu.citrix.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1111181351190.3519@kaball-desktop>
From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
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 <stefano.stabellini@eu.citrix.com>
---
hw/mc146818rtc.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/hw/mc146818rtc.c b/hw/mc146818rtc.c
index cb3f56b..253b680 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);
--
1.7.2.5
next prev parent reply other threads:[~2011-11-18 14:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-18 14:04 [PATCH 0/3] prevent qemu-xen-traditional from waking up needlessly Stefano Stabellini
2011-11-18 14:05 ` [PATCH 1/3] xen: introduce an event channel for buffered io event notifications stefano.stabellini
2012-04-03 14:43 ` Ian Jackson
2011-11-18 14:05 ` stefano.stabellini [this message]
2011-11-18 14:05 ` [PATCH 3/3] increase minimum timeout to 1h stefano.stabellini
2011-12-01 17:56 ` [PATCH 0/3] prevent qemu-xen-traditional from waking up needlessly Ian Jackson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1321625125-30726-2-git-send-email-stefano.stabellini@eu.citrix.com \
--to=stefano.stabellini@eu.citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).