From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:59437) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RksZI-00052G-Kv for qemu-devel@nongnu.org; Wed, 11 Jan 2012 02:26:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RksZA-0007xS-HF for qemu-devel@nongnu.org; Wed, 11 Jan 2012 02:25:56 -0500 Received: from mail.univention.de ([82.198.197.8]:1741) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RksZA-0007xF-9I for qemu-devel@nongnu.org; Wed, 11 Jan 2012 02:25:48 -0500 Received: from localhost (localhost [127.0.0.1]) by slugis.knut.univention.de (Postfix) with ESMTP id 4CCB9164B103 for ; Wed, 11 Jan 2012 08:23:52 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by slugis.knut.univention.de (Postfix) with ESMTP id 3CF24D78E2C for ; Wed, 11 Jan 2012 08:23:52 +0100 (CET) Received: from mail.univention.de ([127.0.0.1]) by localhost (slugis.knut.univention.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UHsLIaduURNr for ; Wed, 11 Jan 2012 08:23:51 +0100 (CET) Received: from stave.knut.univention.de (stave.knut.univention.de [192.168.0.191]) by slugis.knut.univention.de (Postfix) with ESMTPSA id C28F8164B103 for ; Wed, 11 Jan 2012 08:23:51 +0100 (CET) From: Philipp Hahn Date: Wed, 11 Jan 2012 08:25:38 +0100 References: <4F0C03D0.1010801@redhat.com> In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1810498.XK3HkHnaNE"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201201110825.41752.hahn@univention.de> Subject: Re: [Qemu-devel] [PATCH 3/3] stop the periodic RTC update timer List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org --nextPart1810498.XK3HkHnaNE Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hello, On Wednesday 11 January 2012 01:56:25 Zhang, Yang Z wrote: > > -----Original Message----- > > From: Paolo Bonzini [mailto:pbonzini@redhat.com] > > Sent: Tuesday, January 10, 2012 5:25 PM > > > > >> Also, I'm not sure if the update in progress flag still works. > > >> Clients are supposed to wait for UIP=3D0 before reading the RTC, and= an > > >> update is supposed to be at least 220 microseconds away when UIP=3D0. > > > > > > Hardware need a period time to update clock and it would not provide > > > the right value during the update. So it uses UIP to notify the > > > software doesn't believe the value if the UIP is set. For emulation, > > > you can read RTC at any time and it always gives you the right value. > > > So there is no need to emulate UIP. > > > > This is incorrect, for two reasons. First, the UIP is in the spec, and > > we have to implement it. Second, reading the clock is not atomic, and > > waiting for UIP=3D0 gives you 220 microseconds during which you know th= at > > the read will appear atomic. > > For a simulator, we need to follow the spec strictly and simulate hardware > as precisely as possible. But QEMU is a generic machine emulator and > virtualizer. It's not a hardware simulator. If there is an easy way we can > provide the same function, why we chose the complicated one? Also, is the= re > an actual case that break with my patch? =46YI: But you must not break existing implementations (of any (closed-source) OS)= ,=20 which depend on that behaviour of the RTC. Have a look at get_cmos_time() o= f=20 the Xen hypervisor for example (that is the one I have been looking at at t= he=20 past few hours), which explicitliy waits for the falling edge of UIP to get= =20 sub-second precision. This would break if you no longer simulate UIP. Sincerely Philipp =2D-=20 Philipp Hahn Open Source Software Engineer hahn@univention.de Univention GmbH Linux for Your Business fon: +49 421 22 232- 0 Mary-Somerville-Str.1 D-28359 Bremen fax: +49 421 22 232-99 http://www.univention.de/ --nextPart1810498.XK3HkHnaNE Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEUEABECAAYFAk8NOXIACgkQYPlgoZpUDjkgNACgwgOYgSzZbkiCJyeZw2PXZF1y U5kAmKz3NGoCOjGHdVxYAJL8g7Bebu0= =KDpr -----END PGP SIGNATURE----- --nextPart1810498.XK3HkHnaNE--