From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52950) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2H2k-0002iX-LR for qemu-devel@nongnu.org; Wed, 02 Jul 2014 05:41:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X2H2f-0001hL-UB for qemu-devel@nongnu.org; Wed, 02 Jul 2014 05:41:34 -0400 Received: from mail-qg0-x231.google.com ([2607:f8b0:400d:c04::231]:55084) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2H2f-0001hF-QN for qemu-devel@nongnu.org; Wed, 02 Jul 2014 05:41:29 -0400 Received: by mail-qg0-f49.google.com with SMTP id f51so4376869qge.22 for ; Wed, 02 Jul 2014 02:41:29 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <53B3D3C5.8040902@redhat.com> Date: Wed, 02 Jul 2014 11:41:25 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH]Fix a error in mc146818rtc.c List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Lb peace , qemu-devel@nongnu.org Cc: stefanha@redhat.com, alex@alex.org.uk 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 (with "Your Real Name" replaced by your real name, of course). Paolo