From f1a592f4a199f804bf3241277f334f14af3585d4 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 15 Feb 2018 14:46:07 -0500 Subject: [PATCH] cpu: initialize cpu->exception_index on reset This unbreaks linux-user (broken by e511b4d, cpu-exec: reset exception_index correctly, 2014-11-26). Backports commit f9d8f6673591f30028e281e8ff6d5790adc2de83 from qemu --- qemu/qom/cpu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/qemu/qom/cpu.c b/qemu/qom/cpu.c index ca43fdb2..217cf770 100644 --- a/qemu/qom/cpu.c +++ b/qemu/qom/cpu.c @@ -167,6 +167,7 @@ static void cpu_common_reset(CPUState *cpu) cpu->icount_extra = 0; cpu->icount_decr.u32 = 0; cpu->can_do_io = 0; + cpu->exception_index = -1; cpu->crash_occurred = false; memset(cpu->tb_jmp_cache, 0, TB_JMP_CACHE_SIZE * sizeof(void *)); }