qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH]Fix a error in mc146818rtc.c


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH]Fix a error in mc146818rtc.c
Date: Wed, 02 Jul 2014 11:41:25 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

Il 30/06/2014 21:53, Lb peace ha scritto:
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;
--


The patch looks good, but it lacks your sign off.

Please read http://elinux.org/Developer_Certificate_Of_Origin and, if you agree, reply to this email with this line:

Signed-off-by: Your Real Name <address@hidden>

(with "Your Real Name" replaced by your real name, of course).

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]