diff options
author | Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> | 2015-02-09 22:40:50 +0000 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2015-03-09 15:00:06 +0100 |
commit | 032ab092904ce1615e3cedcb9ebc775bd3d7fac6 (patch) | |
tree | 8f6feecca97e64da9f09e06aa322ba9832a6c5a9 /hw/intc | |
parent | 4efef9864082c8daa2a0fcff2d5bc0bfca221d1f (diff) |
openpic: fix up loadvm under -M mac99
Issuing loadvm under -M mac99 would fail for two reasons: firstly an incorrect
version number for openpic would cause openpic_load() to abort, and secondly
a cut/paste error when restoring the IVPR and IDR registers caused subsequent
vmstate sections to become misaligned and abort early.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'hw/intc')
-rw-r--r-- | hw/intc/openpic.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/hw/intc/openpic.c b/hw/intc/openpic.c index e76d7d1db7..9d3beb1817 100644 --- a/hw/intc/openpic.c +++ b/hw/intc/openpic.c @@ -1366,7 +1366,7 @@ static int openpic_load(QEMUFile* f, void *opaque, int version_id) OpenPICState *opp = (OpenPICState *)opaque; unsigned int i, nb_cpus; - if (version_id != 1) { + if (version_id != 2) { return -EINVAL; } @@ -1399,12 +1399,10 @@ static int openpic_load(QEMUFile* f, void *opaque, int version_id) uint32_t val; val = qemu_get_be32(f); - write_IRQreg_idr(opp, i, val); - val = qemu_get_be32(f); write_IRQreg_ivpr(opp, i, val); + val = qemu_get_be32(f); + write_IRQreg_idr(opp, i, val); - qemu_get_be32s(f, &opp->src[i].ivpr); - qemu_get_be32s(f, &opp->src[i].idr); qemu_get_be32s(f, &opp->src[i].destmask); qemu_get_sbe32s(f, &opp->src[i].last_cpu); qemu_get_sbe32s(f, &opp->src[i].pending); |