[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH 4/4] ppc: ensure we update the decrementer value durin
From: |
Mark Cave-Ayland |
Subject: |
[Qemu-ppc] [PATCH 4/4] ppc: ensure we update the decrementer value during migration |
Date: |
Sun, 10 Sep 2017 15:37:35 +0100 |
During local testing with TCG, intermittent errors were found when trying to
migrate Darwin OS images.
The underlying cause was that Darwin resets the decrementer value to fairly
small values on each interrupt. cpu_ppc_set_tb_clk() sets the default value
of the decrementer to 0xffffffff during initialisation which typically
corresponds to several seconds. Hence when restoring the image, the guest
would effectively "lose" decrementer interrupts during this time causing
confusion in the guest.
Signed-off-by: Mark Cave-Ayland <address@hidden>
---
target/ppc/machine.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/target/ppc/machine.c b/target/ppc/machine.c
index 10b3c41..a16a856 100644
--- a/target/ppc/machine.c
+++ b/target/ppc/machine.c
@@ -176,6 +176,7 @@ static void cpu_pre_save(void *opaque)
env->spr[SPR_CFAR] = env->cfar;
#endif
env->spr[SPR_BOOKE_SPEFSCR] = env->spe_fscr;
+ env->spr[SPR_DECR] = cpu_ppc_load_decr(env);
for (i = 0; (i < 4) && (i < env->nb_BATs); i++) {
env->spr[SPR_DBAT0U + 2*i] = env->DBAT[0][i];
@@ -280,6 +281,7 @@ static int cpu_post_load(void *opaque, int version_id)
env->cfar = env->spr[SPR_CFAR];
#endif
env->spe_fscr = env->spr[SPR_BOOKE_SPEFSCR];
+ cpu_ppc_store_decr(env, env->spr[SPR_DECR]);
for (i = 0; (i < 4) && (i < env->nb_BATs); i++) {
env->DBAT[0][i] = env->spr[SPR_DBAT0U + 2*i];
--
1.7.10.4
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 2/4] ppc: add CPU IRQ state to PPC VMStateDescription, (continued)
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 2/4] ppc: add CPU IRQ state to PPC VMStateDescription, David Gibson, 2017/09/13
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 2/4] ppc: add CPU IRQ state to PPC VMStateDescription, Dr. David Alan Gilbert, 2017/09/12
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 2/4] ppc: add CPU IRQ state to PPC VMStateDescription, Mark Cave-Ayland, 2017/09/12
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 2/4] ppc: add CPU IRQ state to PPC VMStateDescription, Mark Cave-Ayland, 2017/09/12
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 2/4] ppc: add CPU IRQ state to PPC VMStateDescription, Alexey Kardashevskiy, 2017/09/12
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 2/4] ppc: add CPU IRQ state to PPC VMStateDescription, David Gibson, 2017/09/13
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 2/4] ppc: add CPU IRQ state to PPC VMStateDescription, Mark Cave-Ayland, 2017/09/13
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 2/4] ppc: add CPU IRQ state to PPC VMStateDescription, Greg Kurz, 2017/09/13
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 2/4] ppc: add CPU IRQ state to PPC VMStateDescription, David Gibson, 2017/09/13
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 2/4] ppc: add CPU IRQ state to PPC VMStateDescription, David Gibson, 2017/09/13
[Qemu-ppc] [PATCH 4/4] ppc: ensure we update the decrementer value during migration,
Mark Cave-Ayland <=
- Re: [Qemu-ppc] [PATCH 4/4] ppc: ensure we update the decrementer value during migration, David Gibson, 2017/09/13
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 4/4] ppc: ensure we update the decrementer value during migration, Mark Cave-Ayland, 2017/09/13
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 4/4] ppc: ensure we update the decrementer value during migration, Laurent Vivier, 2017/09/13
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 4/4] ppc: ensure we update the decrementer value during migration, David Gibson, 2017/09/13
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 4/4] ppc: ensure we update the decrementer value during migration, Mark Cave-Ayland, 2017/09/15
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 4/4] ppc: ensure we update the decrementer value during migration, David Gibson, 2017/09/19
[Qemu-ppc] [PATCH 1/4] ppc: change CPUPPCState access_type from int to uint8_t, Mark Cave-Ayland, 2017/09/10
[Qemu-ppc] [PATCH 3/4] ppc: add CPU access_type into the migration stream, Mark Cave-Ayland, 2017/09/10