From: Jan Kiszka <jan.kiszka@web.de>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: KVM list <kvm@vger.kernel.org>, Gleb Natapov <gleb@redhat.com>,
Marcelo Tosatti <mtosatti@redhat.com>,
qemu-devel <qemu-devel@nongnu.org>,
qemu-stable <qemu-stable@nongnu.org>, Avi Kivity <avi@redhat.com>,
Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [Qemu-devel] [PATCH uq/master] kvm: i8254: Finish time conversion fix
Date: Tue, 14 Aug 2012 09:41:24 +0200 [thread overview]
Message-ID: <502A0124.1020005@web.de> (raw)
In-Reply-To: <50294A1F.9070104@msgid.tls.msk.ru>
[-- Attachment #1: Type: text/plain, Size: 1396 bytes --]
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_info
>> 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.
>
> 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.
>
> And yes, this second half fixes the reported issue with grub timekeeping,
> and should fix the seabios problem as well (so it shouldn't be necessary
> to mess with timekeeping in seabios anymore).
Thanks, great to hear!
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
prev parent reply other threads:[~2012-08-14 7:41 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-09 18:27 [Qemu-devel] TSC in qem[-kvm] 1.1+ and in-kernel irqchip Michael Tokarev
2012-08-09 19:06 ` Marcelo Tosatti
[not found] ` <20120809204748.GA32346@amt.cnet>
2012-08-09 21:36 ` Michael Tokarev
2012-08-10 7:33 ` Gleb Natapov
2012-08-10 9:24 ` Michael Tokarev
2012-08-12 8:10 ` Gleb Natapov
2012-08-12 9:24 ` Michael Tokarev
2012-08-13 13:07 ` Jan Kiszka
2012-08-13 13:16 ` Michael Tokarev
2012-08-13 13:41 ` Jan Kiszka
2012-08-13 18:18 ` [Qemu-devel] [PATCH uq/master] kvm: i8254: Finish time conversion fix Jan Kiszka
2012-08-13 18:40 ` Michael Tokarev
2012-08-14 7:41 ` Jan Kiszka [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=502A0124.1020005@web.de \
--to=jan.kiszka@web.de \
--cc=avi@redhat.com \
--cc=gleb@redhat.com \
--cc=kraxel@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mjt@tls.msk.ru \
--cc=mtosatti@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).