qemu/0003-i8254-Fix-migration-from-qemu-kvm-1.1.patch
Cole Robinson 7fae7fbaf1 Update to qemu 1.5
KVM for ARM support
A native GTK+ UI with internationalization support
Experimental VFIO support for VGA passthrough
Support for VMware PVSCSI and VMXNET3 device emulation
CPU hot-add support
2013-05-21 14:26:12 -04:00

35 lines
1.4 KiB
Diff

From e1f0936bbf84664d7d7fe7bbbdd1595be745b539 Mon Sep 17 00:00:00 2001
From: Cole Robinson <crobinso@redhat.com>
Date: Tue, 19 Feb 2013 15:04:59 -0500
Subject: [PATCH] i8254: Fix migration from qemu-kvm < 1.1
qemu-kvm commit 81bdec908fb2be0ccaff1d4ee67956c509e440ad did this,
but the logic can't be carried unconditionally in qemu.git without
breaking migration from qemu < 1.1.
Conditionalize it with --enable-migrate-from-qemu-kvm
---
hw/timer/i8254_common.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/hw/timer/i8254_common.c b/hw/timer/i8254_common.c
index 5342df4..e74afe3 100644
--- a/hw/timer/i8254_common.c
+++ b/hw/timer/i8254_common.c
@@ -275,7 +275,15 @@ static const VMStateDescription vmstate_pit_common = {
.pre_save = pit_dispatch_pre_save,
.post_load = pit_dispatch_post_load,
.fields = (VMStateField[]) {
+#ifdef CONFIG_MIGRATE_FROM_QEMU_KVM
+ /* qemu-kvm version_id=2 had 'flags' here which is equivalent
+ * This fixes incoming migration from qemu-kvm 1.0, but breaks
+ * incoming migration from qemu < 1.1
+ */
+ VMSTATE_UINT32(channels[0].irq_disabled, PITCommonState),
+#else
VMSTATE_UINT32_V(channels[0].irq_disabled, PITCommonState, 3),
+#endif
VMSTATE_STRUCT_ARRAY(channels, PITCommonState, 3, 2,
vmstate_pit_channel, PITChannelState),
VMSTATE_INT64(channels[0].next_transition_time,