vmstate: add version_id argument to post_load
authorJuan Quintela <quintela@redhat.com>
Tue, 29 Sep 2009 20:48:21 +0000 (22:48 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Mon, 5 Oct 2009 14:32:36 +0000 (09:32 -0500)
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
13 files changed:
exec.c
hw/acpi.c
hw/cirrus_vga.c
hw/dma.c
hw/fdc.c
hw/hpet.c
hw/hw.h
hw/piix_pci.c
hw/serial.c
hw/slavio_intctl.c
hw/tcx.c
hw/vmmouse.c
savevm.c

diff --git a/exec.c b/exec.c
index c82e76714ca3d6394b2e3c88b968cb89caa52673..85076e60904d9a006ec6d80f8bff9bab1488daf9 100644 (file)
--- a/exec.c
+++ b/exec.c
@@ -528,7 +528,7 @@ static int cpu_common_pre_load(void *opaque)
     return 0;
 }
 
-static int cpu_common_post_load(void *opaque)
+static int cpu_common_post_load(void *opaque, int version_id)
 {
     CPUState *env = opaque;
 
index b14b9f4f66e4ec6bc8487e27dab0c0bddc934753..e67da6c25fa700ef5225517d585f22eca52f3de2 100644 (file)
--- a/hw/acpi.c
+++ b/hw/acpi.c
@@ -441,7 +441,7 @@ static void pm_write_config(PCIDevice *d,
         pm_io_space_update((PIIX4PMState *)d);
 }
 
-static int vmstate_acpi_post_load(void *opaque)
+static int vmstate_acpi_post_load(void *opaque, int version_id)
 {
     PIIX4PMState *s = opaque;
 
index ae4be82e47eeaecae03c3e8419f46a665cb7d71a..9dfe76a49b784b1820268bd14df22ef28e342b8c 100644 (file)
@@ -2957,7 +2957,7 @@ static CPUWriteMemoryFunc * const cirrus_mmio_write[3] = {
 
 /* load/save state */
 
-static int cirrus_post_load(void *opaque)
+static int cirrus_post_load(void *opaque, int version_id)
 {
     CirrusVGAState *s = opaque;
 
index f418e4252d4b8e071a342832d02970238ba0aa07..44c642ea11ae22e23cf215e4c4bea32851821891 100644 (file)
--- a/hw/dma.c
+++ b/hw/dma.c
@@ -517,7 +517,7 @@ static const VMStateDescription vmstate_dma_regs = {
     }
 };
 
-static int dma_post_load(void *opaque)
+static int dma_post_load(void *opaque, int version_id)
 {
     DMA_run();
 
index 389d9e6a01254e0911c7699a9832b5fc25cc28e6..c03ab476c3ec5914326dc47bfb8e20f76c11d6f9 100644 (file)
--- a/hw/fdc.c
+++ b/hw/fdc.c
@@ -650,7 +650,7 @@ static void fdc_pre_save(const void *opaque)
     s->dor_vmstate = s->dor | GET_CUR_DRV(s);
 }
 
-static int fdc_post_load(void *opaque)
+static int fdc_post_load(void *opaque, int version_id)
 {
     fdctrl_t *s = opaque;
 
index c1ead34446b762040fbdb26c12e3944afa38491b..6535b8ebf20766aa4224e897d15b64bd409dd73c 100644 (file)
--- a/hw/hpet.c
+++ b/hw/hpet.c
@@ -164,7 +164,7 @@ static void hpet_pre_save(const void *opaque)
     s->hpet_counter = hpet_get_ticks();
 }
 
-static int hpet_post_load(void *opaque)
+static int hpet_post_load(void *opaque, int version_id)
 {
     HPETState *s = opaque;
 
diff --git a/hw/hw.h b/hw/hw.h
index e40781503d36a0c9f74ea13acd19f292b550f776..6f60493ce7bf3d6a11a020c1ff791adeafa2f1cd 100644 (file)
--- a/hw/hw.h
+++ b/hw/hw.h
@@ -307,7 +307,7 @@ struct VMStateDescription {
     int minimum_version_id_old;
     LoadStateHandler *load_state_old;
     int (*pre_load)(void *opaque);
-    int (*post_load)(void *opaque);
+    int (*post_load)(void *opaque, int version_id);
     void (*pre_save)(const void *opaque);
     void (*post_save)(const void *opaque);
     VMStateField *fields;
index edd6df07e313a23ac180fce0ab39811591ca2299..5c2bb92f9c55bfa62b04d525e05f396a5fc195be 100644 (file)
@@ -172,7 +172,7 @@ static int i440fx_load_old(QEMUFile* f, void *opaque, int version_id)
     return 0;
 }
 
-static int i440fx_post_load(void *opaque)
+static int i440fx_post_load(void *opaque, int version_id)
 {
     PCII440FXState *d = opaque;
 
index 6e8c6e165608d2fd56c53104e49c7dc26824fec1..6e37ead06e2e67c0087ad832c017e9b5a74c04c0 100644 (file)
@@ -648,7 +648,7 @@ static int serial_pre_load(void *opaque)
     return 0;
 }
 
-static int serial_post_load(void *opaque)
+static int serial_post_load(void *opaque, int version_id)
 {
     SerialState *s = opaque;
 
index 6a95f9ef7d56ed8eb5a82f118aa26ef9c72851d6..ab29ee294358706d6c6ec7cefa2b9302f7e6115f 100644 (file)
@@ -374,7 +374,7 @@ static void slavio_set_irq_all(void *opaque, int irq, int level)
     }
 }
 
-static int vmstate_intctl_post_load(void *opaque)
+static int vmstate_intctl_post_load(void *opaque, int version_id)
 {
     SLAVIO_INTCTLState *s = opaque;
 
index 012d01b848fd20582f2a0749a060a5c5a5f79ea3..3816c531e2bd019ee95b4323b624d89ee598d6ac 100644 (file)
--- a/hw/tcx.c
+++ b/hw/tcx.c
@@ -378,7 +378,7 @@ static void tcx24_invalidate_display(void *opaque)
     qemu_console_resize(s->ds, s->width, s->height);
 }
 
-static int vmstate_tcx_post_load(void *opaque)
+static int vmstate_tcx_post_load(void *opaque, int version_id)
 {
     TCXState *s = opaque;
 
index c207bb2b2f1f2c14c5d8c6baf03fa404c51dec7f..bb6e6056d6ac08d4aae947221702523dd0fb6b72 100644 (file)
@@ -235,7 +235,7 @@ static uint32_t vmmouse_ioport_read(void *opaque, uint32_t addr)
     return data[0];
 }
 
-static int vmmouse_post_load(void *opaque)
+static int vmmouse_post_load(void *opaque, int version_id)
 {
     VMMouseState *s = opaque;
 
index b36c6574dcbde6ae46dbe5c68d5946927a218d53..fefde7c20779e4d0364a4003d9e9e468fe2d785c 100644 (file)
--- a/savevm.c
+++ b/savevm.c
@@ -1084,7 +1084,7 @@ int vmstate_load_state(QEMUFile *f, const VMStateDescription *vmsd,
         field++;
     }
     if (vmsd->post_load) {
-        return vmsd->post_load(opaque);
+        return vmsd->post_load(opaque, version_id);
     }
     return 0;
 }