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
This commit is contained in:
Paolo Bonzini 2018-02-15 14:46:07 -05:00 committed by Lioncash
parent 5e2862b29d
commit f1a592f4a1
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -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 *));
}