[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCHv3 7/9] openpic: fix up loadvm under -M mac99
From: |
Mark Cave-Ayland |
Subject: |
[Qemu-ppc] [PATCHv3 7/9] openpic: fix up loadvm under -M mac99 |
Date: |
Mon, 9 Feb 2015 22:40:50 +0000 |
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 <address@hidden>
---
hw/intc/openpic.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/hw/intc/openpic.c b/hw/intc/openpic.c
index 8699a4a..4194cef 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);
--
1.7.10.4
- [Qemu-ppc] [PATCHv3 0/9] ppc: loadvm/savevm fixups for -M g3beige and -M mac99, Mark Cave-Ayland, 2015/02/09
- [Qemu-ppc] [PATCHv3 1/9] macio.c: include parent PCIDevice state in VMStateDescription, Mark Cave-Ayland, 2015/02/09
- [Qemu-ppc] [PATCHv3 7/9] openpic: fix up loadvm under -M mac99,
Mark Cave-Ayland <=
- [Qemu-ppc] [PATCHv3 4/9] target-ppc: move sdr1 value change detection logic to helper_store_sdr1(), Mark Cave-Ayland, 2015/02/09
- [Qemu-ppc] [PATCHv3 5/9] target-ppc: force update of msr bits in cpu_post_load, Mark Cave-Ayland, 2015/02/09
- [Qemu-ppc] [PATCHv3 3/9] cuda.c: include adb_poll_timer in VMStateDescription, Mark Cave-Ayland, 2015/02/09
- [Qemu-ppc] [PATCHv3 8/9] openpic: switch IRQQueue queue from inline to bitmap, Mark Cave-Ayland, 2015/02/09
- [Qemu-ppc] [PATCHv3 2/9] adb.c: include ADBDevice parent state in KBDState and MouseState, Mark Cave-Ayland, 2015/02/09
- [Qemu-ppc] [PATCHv3 6/9] openpic: fix segfault on -M mac99 savevm, Mark Cave-Ayland, 2015/02/09
- [Qemu-ppc] [PATCHv3 9/9] openpic: convert to vmstate, Mark Cave-Ayland, 2015/02/09
- Re: [Qemu-ppc] [PATCHv3 0/9] ppc: loadvm/savevm fixups for -M g3beige and -M mac99, Mark Cave-Ayland, 2015/02/27