From: Jan Kiszka <jan.kiszka@web.de>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
Marcelo Tosatti <mtosatti@redhat.com>,
Avi Kivity <avi@redhat.com>,
kvm@vger.kernel.org, qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 2/4] i8254: Open-code timer restore
Date: Sun, 05 Feb 2012 12:33:43 +0100 [thread overview]
Message-ID: <4F2E6917.2080900@web.de> (raw)
In-Reply-To: <4F2E66C7.8070505@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1374 bytes --]
On 2012-02-05 12:23, Paolo Bonzini wrote:
> On 02/05/2012 11:46 AM, Jan Kiszka wrote:
>> diff --git a/hw/i8254_common.c b/hw/i8254_common.c
>> index 0601d88..b60fbda 100644
>> --- a/hw/i8254_common.c
>> +++ b/hw/i8254_common.c
>> @@ -234,9 +234,8 @@ static int pit_load_old(QEMUFile *f, void *opaque,
>> int version_id)
>> qemu_get_8s(f,&s->gate);
>> s->count_load_time = qemu_get_be64(f);
>> s->irq_disabled = 0;
>> - if (s->irq_timer) {
>> + if (i == 0) {
>> s->next_transition_time = qemu_get_be64(f);
>> - qemu_get_timer(f, s->irq_timer);
>> }
>> }
>> return 0;
>
> You need to invoke the post load callback manually in the load_old
> callback; see vmstate_load_state:
>
> if (version_id < vmsd->minimum_version_id) {
> return vmsd->load_state_old(f, opaque, version_id);
> }
>
> I noticed that in apic_common's apic_load_old you don't have the bug,
> but on the other hand you're unconditionally loading into s->timer, so
> "old" migration to a destination with in-kernel APIC doesn't work:
>
> if (version_id >= 2) {
> qemu_get_timer(f, s->timer);
> }
>
Hmm, true. The whole load_old is broken, in both APIC and PIT. Need to
call the post_load callbacks from there as well. Will fix, thanks.
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
next prev parent reply other threads:[~2012-02-05 11:34 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-05 10:46 [Qemu-devel] [PATCH 0/4] uq/master: Introduce KVM PIT support Jan Kiszka
2012-02-05 10:46 ` [Qemu-devel] [PATCH 1/4] i8254: Factor out base class for KVM reuse Jan Kiszka
2012-02-05 10:46 ` [Qemu-devel] [PATCH 2/4] i8254: Open-code timer restore Jan Kiszka
2012-02-05 11:23 ` Paolo Bonzini
2012-02-05 11:33 ` Jan Kiszka [this message]
2012-02-05 12:03 ` [Qemu-devel] [PATCH 2/4 v3] " Jan Kiszka
2012-02-05 10:46 ` [Qemu-devel] [PATCH 3/4] kvm: Add kvm_has_pit_state2 helper Jan Kiszka
2012-02-05 20:03 ` Juan Quintela
2012-02-05 20:36 ` Jan Kiszka
2012-02-05 10:46 ` [Qemu-devel] [PATCH 4/4] kvm: x86: Add user space part for in-kernel i8254 Jan Kiszka
2012-02-08 18:24 ` [Qemu-devel] [PATCH 0/4] uq/master: Introduce KVM PIT support Marcelo Tosatti
-- strict thread matches above, loose matches on Subject: below --
2012-01-31 18:46 Jan Kiszka
2012-01-31 18:46 ` [Qemu-devel] [PATCH 2/4] i8254: Open-code timer restore Jan Kiszka
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=4F2E6917.2080900@web.de \
--to=jan.kiszka@web.de \
--cc=aliguori@us.ibm.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@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).