]> git.proxmox.com Git - qemu.git/commitdiff
ioapic: Add support for qemu-kvm's vmstate v2
authorJan Kiszka <jan.kiszka@siemens.com>
Thu, 3 Feb 2011 21:54:13 +0000 (22:54 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 4 Feb 2011 12:53:52 +0000 (06:53 -0600)
qemu-kvm carries the IOAPIC base address in its v2 vmstate. We only
support the default base address so far, and saving even that in the
device state was rejected.

Add a padding field to be able to read qemu-kvm's old state, but
increase our version to 3, indicating that we are not saving a valid
address. This also gives downstream the chance to change to stop
evaluating the base_address and move to v3 as well.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit 5dce499948e4a4abe62f010baf4a7ed3d49e53cb)

hw/ioapic.c

index 8c46c1dfdb8f29e54a0d2262929d5f6494c42ad2..fb3d17329aa2ff9802118cc19a898fd08aa28892 100644 (file)
@@ -244,13 +244,14 @@ static int ioapic_post_load(void *opaque, int version_id)
 
 static const VMStateDescription vmstate_ioapic = {
     .name = "ioapic",
-    .version_id = 2,
+    .version_id = 3,
     .post_load = ioapic_post_load,
     .minimum_version_id = 1,
     .minimum_version_id_old = 1,
     .fields      = (VMStateField []) {
         VMSTATE_UINT8(id, IOAPICState),
         VMSTATE_UINT8(ioregsel, IOAPICState),
+        VMSTATE_UNUSED_V(2, 8), /* to account for qemu-kvm's v2 format */
         VMSTATE_UINT32_V(irr, IOAPICState, 2),
         VMSTATE_UINT64_ARRAY(ioredtbl, IOAPICState, IOAPIC_NUM_PINS),
         VMSTATE_END_OF_LIST()