Re: [PATCH 2/4] i8254: Open-code timer restore

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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);
    }

Paolo

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux