From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:46978) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QkfSj-0001py-Dg for qemu-devel@nongnu.org; Sat, 23 Jul 2011 12:54:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QkfSi-0007UU-0O for qemu-devel@nongnu.org; Sat, 23 Jul 2011 12:54:01 -0400 Received: from e2.ny.us.ibm.com ([32.97.182.142]:44323) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QkfSh-0007UM-U6 for qemu-devel@nongnu.org; Sat, 23 Jul 2011 12:53:59 -0400 Received: from d01relay06.pok.ibm.com (d01relay06.pok.ibm.com [9.56.227.116]) by e2.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id p6NGWklj010690 for ; Sat, 23 Jul 2011 12:32:46 -0400 Received: from d01av03.pok.ibm.com (d01av03.pok.ibm.com [9.56.224.217]) by d01relay06.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p6NGqgcK868392 for ; Sat, 23 Jul 2011 12:52:42 -0400 Received: from d01av03.pok.ibm.com (loopback [127.0.0.1]) by d01av03.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p6NCqUrw003425 for ; Sat, 23 Jul 2011 09:52:30 -0300 Message-ID: <4E2AFC59.2070109@us.ibm.com> Date: Sat, 23 Jul 2011 11:52:41 -0500 From: Anthony Liguori MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 0/3] Let RTC follow backward jumps of host clock immediately List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: Zachary Amsden , qemu-devel@nongnu.org, Gleb Natapov On 06/20/2011 07:06 AM, Jan Kiszka wrote: > Just noticed that this issue is still unfixed because my series was > somehow forgotten. So I've rebased it over current master, refactored it > to use the generic Notifier infrastructure and renamed it to "clock > reset notifier" to avoid confusion with icount related "warping". Please > review / apply before 0.15-rc0, it fixes a relevant issue. > > Original series description: > > By default, we base the mc146818 RTC on the host clock (CLOCK_REALTIME). > This works fine if only the frequency of the host clock is tuned (e.g. > by NTP) or if it is set to a future time. However, if the host is tuned > backward, e.g. because NTP obtained the correct time after the guest was > already started or the admin decided to tune the local time, we see an > unpleasant effect in the guest: The RTC will stall for the period the > host clock is set back. We identified that one prominent guest affected > by this is Windows which relies on the periodic RTC interrupt for time > keeping. > > This series address the issue by detecting those warps and providing a > callback mechanism to device models. The RTC is enabled to update its > timers and register content immediately. Tested successfully both with > hwclock in a Linux guest and by monitoring the Windows clock while > fiddling with the host time. > > Note that if this kind of RTC adjustment is not wanted, the user is > still free to decouple the RTC from the host clock and base it on the > VM clock - just like before. > > Jan Kiszka (3): > notifier: Pass data argument to callback > qemu-timer: Introduce clock reset notifier > mc146818rtc: Handle host clock resets Applied. Thanks. Regards, Anthony Liguori > > hw/fw_cfg.c | 2 +- > hw/mc146818rtc.c | 20 ++++++++++++++++++++ > input.c | 2 +- > migration.c | 12 ++++++------ > notify.c | 4 ++-- > notify.h | 4 ++-- > qemu-timer.c | 29 ++++++++++++++++++++++++++++- > qemu-timer.h | 5 +++++ > ui/sdl.c | 2 +- > ui/spice-core.c | 2 +- > ui/spice-input.c | 4 ++-- > ui/vnc.c | 4 ++-- > usb-linux.c | 2 +- > vl.c | 4 ++-- > xen-all.c | 2 +- > 15 files changed, 75 insertions(+), 23 deletions(-) > > >