qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC PATCH 19/26] cpu-exec: reset exit flag before call


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [RFC PATCH 19/26] cpu-exec: reset exit flag before calling cpu_exec_nocache
Date: Thu, 2 Nov 2017 15:43:26 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

On 02/11/2017 13:45, Pavel Dovgalyuk wrote:
>> But if u16.high is -1, shouldn't you return EXCP_INTERRUPT first (via
>> "Finally, check if we need to exit to the main loop" in
>> cpu_handle_interrupt)?  Then only cause the exception when that one is
>> processed.
> The case is the following.
> 1. There are no pending instructions to execute, cpu_loop_exec_tb finished.
> 2. There are no interrupts and cpu_handle_interrupt sets cpu->exception_index 
> = EXCP_INTERRUPT
> 3. There are no pending exceptions and cpu_handle_exception goes to the last 
> branch,
>    because there is an exception flag in the log.
> 4. cpu_exec_nocache translates the block and tries to execute it, causing an 
> exception
> 

Then the fix is indeed to clear u16.high in cpu_handle_interrupt instead
of cpu_loop_exec_tb---see my other reply.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]