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