From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MicLQ-0005lP-4f for qemu-devel@nongnu.org; Tue, 01 Sep 2009 19:00:56 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MicLL-0005jZ-KQ for qemu-devel@nongnu.org; Tue, 01 Sep 2009 19:00:55 -0400 Received: from [199.232.76.173] (port=37491 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MicLL-0005jQ-8f for qemu-devel@nongnu.org; Tue, 01 Sep 2009 19:00:51 -0400 Received: from an-out-0708.google.com ([209.85.132.242]:61848) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MicLK-0004KA-Ha for qemu-devel@nongnu.org; Tue, 01 Sep 2009 19:00:50 -0400 Received: by an-out-0708.google.com with SMTP id c38so155949ana.37 for ; Tue, 01 Sep 2009 16:00:49 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <1251822154-5423-1-git-send-email-glommer@redhat.com> Date: Tue, 1 Sep 2009 20:00:49 -0300 Message-ID: <5d6222a80909011600l264f1f3cpb0b8d503dac9a26a@mail.gmail.com> Subject: Re: [Qemu-devel] [PATCH] re-set rtc date on reset handler From: Glauber Costa Content-Type: text/plain; charset=UTF-8 List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: Glauber Costa , aliguori@us.ibm.com, qemu-devel@nongnu.org On Tue, Sep 1, 2009 at 1:56 PM, Blue Swirl wrote: > On Tue, Sep 1, 2009 at 7:22 PM, Glauber Costa wrote: >> guests without a stable timesource such as kvm-clock will grab the wallclock >> from our rtc chip. However, we only sync the date when we first launch qemu. >> If a guest goes through a series of reboot cycles, it will slowly see time >> getting far behind the host. >> >> The proposal of this patch is to set the date to host clock again in the reset >> handler. With this patch, I see a Fedora guest keeping its clock in sync upon >> an ulimited number of reboots. > > A different approach is used in m48t59.c: the guest clock is generated > directly from host clock without any timers and only a fixed offset You mean at every ioport read? I actually thought about that, but was too lazy... -- Glauber Costa. "Free as in Freedom" http://glommer.net "The less confident you are, the more serious you have to act."