[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PULL 07/11] cpu-exec: don't overwrite exception_index
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PULL 07/11] cpu-exec: don't overwrite exception_index |
Date: |
Mon, 20 Nov 2017 22:08:14 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 |
On 20/11/2017 13:50, Peter Maydell wrote:
> More generally, this commit seems to assume that QEMU always
> does:
> * set exception_index to something
> * handle that
> * clear exception_index to -1
>
> but it's not clear to me that it's actually always the case
> that it gets cleared back to -1.
After returning from cpu_handle_interrupt, cpu_exec goes to
cpu_handle_exception which does
if (cpu->exception_index >= EXCP_INTERRUPT) {
*ret = cpu->exception_index;
if (*ret == EXCP_DEBUG) {
cpu_handle_debug_exception(cpu);
}
cpu->exception_index = -1;
return true;
} else {
CPUClass *cc = CPU_GET_CLASS(cpu);
qemu_mutex_lock_iothread();
cc->do_interrupt(cpu);
qemu_mutex_unlock_iothread();
cpu->exception_index = -1;
}
return false;
Does ARM have a case where cc->do_interrupt can longjmp back to the
beginning of cpu_handle_exception? But I still do not understand why
you don't eventually clear exception_index to -1. Maybe there should be
an assertion for that before and after cpu_handle_interrupt.
Thanks,
Paolo
- [Qemu-devel] [PULL 02/11] ioapic/tracing: Remove last DPRINTFs, (continued)
- [Qemu-devel] [PULL 02/11] ioapic/tracing: Remove last DPRINTFs, Paolo Bonzini, 2017/11/16
- [Qemu-devel] [PULL 06/11] vhost-user-scsi: add missing virtqueue_size param, Paolo Bonzini, 2017/11/16
- [Qemu-devel] [PULL 05/11] target-i386: adds PV_TLB_FLUSH CPUID feature bit, Paolo Bonzini, 2017/11/16
- [Qemu-devel] [PULL 07/11] cpu-exec: don't overwrite exception_index, Paolo Bonzini, 2017/11/16
- Re: [Qemu-devel] [PULL 07/11] cpu-exec: don't overwrite exception_index, Peter Maydell, 2017/11/17
- Re: [Qemu-devel] [PULL 07/11] cpu-exec: don't overwrite exception_index, Paolo Bonzini, 2017/11/17
- Re: [Qemu-devel] [PULL 07/11] cpu-exec: don't overwrite exception_index, Peter Maydell, 2017/11/17
- Re: [Qemu-devel] [PULL 07/11] cpu-exec: don't overwrite exception_index, Pavel Dovgalyuk, 2017/11/20
- Re: [Qemu-devel] [PULL 07/11] cpu-exec: don't overwrite exception_index, Peter Maydell, 2017/11/20
- Re: [Qemu-devel] [PULL 07/11] cpu-exec: don't overwrite exception_index, Peter Maydell, 2017/11/20
- Re: [Qemu-devel] [PULL 07/11] cpu-exec: don't overwrite exception_index,
Paolo Bonzini <=
[Qemu-devel] [PULL 09/11] util/stats64: Fix min/max comparisons, Paolo Bonzini, 2017/11/16
[Qemu-devel] [PULL 08/11] cpu-exec: avoid cpu_exec_nocache infinite loop with record/replay, Paolo Bonzini, 2017/11/16
[Qemu-devel] [PULL 10/11] exec: Do not resolve subpage in mru_section, Paolo Bonzini, 2017/11/16
[Qemu-devel] [PULL 11/11] fix scripts/update-linux-headers.sh here document, Paolo Bonzini, 2017/11/16
Re: [Qemu-devel] [PULL 00/11] Miscellaneous patches for QEMU 2.11-rc2, Peter Maydell, 2017/11/16