[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: |
Fri, 17 Nov 2017 21:26:44 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 |
On 17/11/2017 21:07, Peter Maydell wrote:
> On 16 November 2017 at 11:59, Paolo Bonzini <address@hidden> wrote:
>> From: Pavel Dovgalyuk <address@hidden>
>>
>> This patch adds a condition before overwriting exception_index fiels.
>> It is needed when exception_index is already set to some meaningful value.
>>
>> Signed-off-by: Pavel Dovgalyuk <address@hidden>
>>
>> Message-Id: <address@hidden>
>> Signed-off-by: Paolo Bonzini <address@hidden>
>> ---
>> accel/tcg/cpu-exec.c | 4 +++-
>> 1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c
>> index 61297f8f4a..0473055a08 100644
>> --- a/accel/tcg/cpu-exec.c
>> +++ b/accel/tcg/cpu-exec.c
>> @@ -594,7 +594,9 @@ static inline bool cpu_handle_interrupt(CPUState *cpu,
>> if (unlikely(atomic_read(&cpu->exit_request)
>> || (use_icount && cpu->icount_decr.u16.low + cpu->icount_extra ==
>> 0))) {
>> atomic_set(&cpu->exit_request, 0);
>> - cpu->exception_index = EXCP_INTERRUPT;
>> + if (cpu->exception_index == -1) {
>> + cpu->exception_index = EXCP_INTERRUPT;
>> + }
>> return true;
>> }
>
> Hi. This commit breaks booting of Debian on aarch64 virt board.
> (repro instructions for creating the image available at:
> https://translatedcode.wordpress.com/2017/07/24/installing-debian-on-qemus-64-bit-arm-virt-board/)
> The guest kernel never prints anything to the serial port.
>
> Reverting this commit fixes master for me, so I plan to do
> that on Monday.
Maybe you can also test moving the atomic_set inside the "if". It does
seem to be a genuine bugfix.
Paolo
- [Qemu-devel] [PULL 00/11] Miscellaneous patches for QEMU 2.11-rc2, Paolo Bonzini, 2017/11/16
- [Qemu-devel] [PULL 01/11] Enable 8-byte wide MMIO for 16550 serial devices, Paolo Bonzini, 2017/11/16
- [Qemu-devel] [PULL 03/11] Makefile: simpler/faster "make help", Paolo Bonzini, 2017/11/16
- [Qemu-devel] [PULL 04/11] thread-posix: fix qemu_rec_mutex_trylock macro, Paolo Bonzini, 2017/11/16
- [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 <=
- 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, 2017/11/20
[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