qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH]Fix a error in mc146818rtc.c
@ 2014-06-30 19:53 Lb peace
  2014-06-30 20:08 ` Alex Bligh
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Lb peace @ 2014-06-30 19:53 UTC (permalink / raw)
  To: qemu-devel; +Cc: alex, stefanha

[-- Attachment #1: Type: text/plain, Size: 1175 bytes --]

If you use hwclock in guest os ,you will find the result of hwclock isn't
changed after changing host os's clock.
I find this issue is generated in this patch:

http://lists.gnu.org/archive/html/qemu-devel/2013-08/msg03353.html
Before this patch,the result will be changed if you change host's clock.
It makes use of the following codes in qemu-timer.c:
        if (now < last) {
            notifier_list_notify(&clock->reset_notifiers, &now);
        }
It is useless if you register a QEMU_CLOCK_REALTIME's clock_reset_notifier,
---
 hw/timer/mc146818rtc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/timer/mc146818rtc.c b/hw/timer/mc146818rtc.c
index df54546..821c27e 100644
--- a/hw/timer/mc146818rtc.c
+++ b/hw/timer/mc146818rtc.c
@@ -879,7 +879,7 @@ static void rtc_realizefn(DeviceState *dev, Error
**errp)
     check_update_timer(s);

     s->clock_reset_notifier.notify = rtc_notify_clock_reset;
-    qemu_clock_register_reset_notifier(QEMU_CLOCK_REALTIME,
+    qemu_clock_register_reset_notifier(rtc_clock,
                                        &s->clock_reset_notifier);

     s->suspend_notifier.notify = rtc_notify_suspend;
--

[-- Attachment #2: Type: text/html, Size: 1707 bytes --]

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-07-02  9:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-30 19:53 [Qemu-devel] [PATCH]Fix a error in mc146818rtc.c Lb peace
2014-06-30 20:08 ` Alex Bligh
2014-07-01  1:12   ` Lb peace
2014-07-01 18:50     ` Alex Bligh
2014-07-02  8:29 ` Stefan Hajnoczi
2014-07-02  9:41 ` Paolo Bonzini

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).