From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH uq/master] kvm: i8254: Finish time conversion fix Date: Tue, 14 Aug 2012 09:41:24 +0200 Message-ID: <502A0124.1020005@web.de> 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> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig091463DCF15FCBA6B62E22EB" Cc: Avi Kivity , Marcelo Tosatti , Gerd Hoffmann , KVM list , Gleb Natapov , qemu-devel , qemu-stable To: Michael Tokarev Return-path: Received: from mout.web.de ([212.227.17.12]:50016 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754761Ab2HNHla (ORCPT ); Tue, 14 Aug 2012 03:41:30 -0400 In-Reply-To: <50294A1F.9070104@msgid.tls.msk.ru> Sender: kvm-owner@vger.kernel.org List-ID: 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--