From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:34018) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1Bky-0003aY-IK for qemu-devel@nongnu.org; Tue, 14 Aug 2012 03:41:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T1Bkw-0006cg-3e for qemu-devel@nongnu.org; Tue, 14 Aug 2012 03:41:40 -0400 Message-ID: <502A0124.1020005@web.de> Date: Tue, 14 Aug 2012 09:41:24 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <5024011F.2020200@msgid.tls.msk.ru> <20120810073346.GD24410@redhat.com> <5024D336.5090108@msgid.tls.msk.ru> <20120812081038.GJ3341@redhat.com> <50277631.2080808@msgid.tls.msk.ru> <5028FC02.4090205@siemens.com> <5028FE26.9090504@msgid.tls.msk.ru> <502944F9.9070200@siemens.com> <50294A1F.9070104@msgid.tls.msk.ru> In-Reply-To: <50294A1F.9070104@msgid.tls.msk.ru> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig091463DCF15FCBA6B62E22EB" Subject: Re: [Qemu-devel] [PATCH uq/master] kvm: i8254: Finish time conversion fix List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Tokarev Cc: KVM list , Gleb Natapov , Marcelo Tosatti , qemu-devel , qemu-stable , Avi Kivity , Gerd Hoffmann This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig091463DCF15FCBA6B62E22EB Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2012-08-13 20:40, Michael Tokarev wrote: > On 13.08.2012 22:18, Jan Kiszka wrote: >> 0cdd3d1444 fixed reading back the counter load time from the kernel >> while assuming the kernel would always update its load time on writing= >> the state. That is only true for channel 1, and so pit_get_channel_inf= o >> returned wrong output pin states for high counter values. >> >> Fix this by applying the offset also on kvm_pit_put. For this purpose,= >> we cache the clock offset in KVMPITState, only updating it on VM state= >> changes or when we write the state while the VM is stopped. >=20 > Wug. The fix (consisting of two halves) appears to be quite messy. I will split it up into offset caching and application to kvm_pit_put. > Is it a (temporary) workaround or a real solution? No, this is the real solution. It may look complex, but it is required due to the different time bases of the in-kernel PIT and QEMU's vmclock. We didn't care about this in qemu-kvm in the past, but upstream now actually supports migration between in-kernel and user space models, and it also supports the PC speaker with the in-kernel PIT enabled. >=20 > And yes, this second half fixes the reported issue with grub timekeepin= g, > and should fix the seabios problem as well (so it shouldn't be necessar= y > to mess with timekeeping in seabios anymore). Thanks, great to hear! Jan --------------enig091463DCF15FCBA6B62E22EB 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.16 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAlAqASQACgkQitSsb3rl5xRxNQCeMBsO/Nk+xluKiN6qSytGWOno KHEAn0EtLKadYQj+UnNxZ6VU6Tzug/It =lQE0 -----END PGP SIGNATURE----- --------------enig091463DCF15FCBA6B62E22EB--