From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MlSc0-0000j7-KW for qemu-devel@nongnu.org; Wed, 09 Sep 2009 15:13:48 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MlSbw-0000iv-1W for qemu-devel@nongnu.org; Wed, 09 Sep 2009 15:13:48 -0400 Received: from [199.232.76.173] (port=59108 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MlSbv-0000is-Su for qemu-devel@nongnu.org; Wed, 09 Sep 2009 15:13:43 -0400 Received: from fmmailgate02.web.de ([217.72.192.227]:33028) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MlSbv-0002Wz-4I for qemu-devel@nongnu.org; Wed, 09 Sep 2009 15:13:43 -0400 Message-ID: <4AA7FE6D.2030007@web.de> Date: Wed, 09 Sep 2009 21:13:49 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <20090909151111.26816.49862.stgit@mchn012c.ww002.siemens.net> In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig8F80FB83E3E03E7F462CB81C" Sender: jan.kiszka@web.de Subject: [Qemu-devel] Re: [PATCH 0/5] Refactor and enhance RTC configuration List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: Dor Laor , Anthony Liguori , Glauber Costa , qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig8F80FB83E3E03E7F462CB81C Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Blue Swirl wrote: > On Wed, Sep 9, 2009 at 6:11 PM, Jan Kiszka wrote: >> The aim of this series is to allow using the emulated PC RTC (MC146818= ) >> as a reliable time source for guests. This is particularly useful if t= he >> host runs NTP or has otherwise access to an accurate clock while the >> guest has not (no network, impossible to add an NTP implementation >> etc.). >=20 > What I meant in the earlier thread is that m48t59 port read for time > or date gets the data directly from host using qemu_get_timedate(). > PC RTC instead uses a timer: the timer callback updates the cmos_data > structure. It seems that you just replace the timer with a new one. > I'd remove the timer altogether and change the cmos_ioport_read to > call qemu_get_timedate(). That was my first idea as well, but the timer is there to emulate real hardware behavior: Updates only take place while the UIP flag is set in register A, and they take a few hundred microseconds. Guests actually wait for this to happen and only read out after such a change. Moreover, updates can trigger interrupts. For sure one could avoid these update timers. But as they are so rare (1 HZ...), I didn't want to prematurely optimize the code here, risking regressions while trying to fix our problems. Jan --------------enig8F80FB83E3E03E7F462CB81C Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkqn/nEACgkQniDOoMHTA+mF2wCfalm12Hr/SqBDXb6FYbuWr6y+ cOgAnRivewIEhLfTm5p/DHODFrJltx4v =y+zX -----END PGP SIGNATURE----- --------------enig8F80FB83E3E03E7F462CB81C--