[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 12:33:22 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 |
On 02/11/2017 12:24, Pavel Dovgalyuk wrote:
>> I am not sure about this. I think if instead you should return false
>> from here and EXCP_INTERRUPT from cpu_exec.
> The problem is inside the TB. It checks cpu->icount_decr.u16.high which is -1.
> And we have to enter the TB to cause an exception (because it exists in
> replay log).
> That is why we reset this flag and try to execute the TB.
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.
Paolo
>> More important: there is still a race, because high can be set to -1
>> right after your atomic_set.
> I'm not sure about it. But even the race exists, exec_nocache attempt will be
> repeated
> after failed try.
>
> Returning true is ok here, because we know that exception will happen
> (because it is
> recorded in the log).
- Re: [Qemu-devel] [RFC PATCH 19/26] cpu-exec: reset exit flag before calling cpu_exec_nocache, Paolo Bonzini, 2017/11/02
- Re: [Qemu-devel] [RFC PATCH 19/26] cpu-exec: reset exit flag before calling cpu_exec_nocache, Pavel Dovgalyuk, 2017/11/02
- Re: [Qemu-devel] [RFC PATCH 19/26] cpu-exec: reset exit flag before calling cpu_exec_nocache,
Paolo Bonzini <=
- Re: [Qemu-devel] [RFC PATCH 19/26] cpu-exec: reset exit flag before calling cpu_exec_nocache, Paolo Bonzini, 2017/11/02
- Re: [Qemu-devel] [RFC PATCH 19/26] cpu-exec: reset exit flag before calling cpu_exec_nocache, Pavel Dovgalyuk, 2017/11/03
- Re: [Qemu-devel] [RFC PATCH 19/26] cpu-exec: reset exit flag before calling cpu_exec_nocache, Paolo Bonzini, 2017/11/06
- Re: [Qemu-devel] [RFC PATCH 19/26] cpu-exec: reset exit flag before calling cpu_exec_nocache, Pavel Dovgalyuk, 2017/11/10
- Re: [Qemu-devel] [RFC PATCH 19/26] cpu-exec: reset exit flag before calling cpu_exec_nocache, Paolo Bonzini, 2017/11/10
- Re: [Qemu-devel] [RFC PATCH 19/26] cpu-exec: reset exit flag before calling cpu_exec_nocache, Pavel Dovgalyuk, 2017/11/10
- Re: [Qemu-devel] [RFC PATCH 19/26] cpu-exec: reset exit flag before calling cpu_exec_nocache, Paolo Bonzini, 2017/11/10
- Re: [Qemu-devel] [RFC PATCH 19/26] cpu-exec: reset exit flag before calling cpu_exec_nocache, Alex Bennée, 2017/11/06
- Re: [Qemu-devel] [RFC PATCH 19/26] cpu-exec: reset exit flag before calling cpu_exec_nocache, Pavel Dovgalyuk, 2017/11/02
- Re: [Qemu-devel] [RFC PATCH 19/26] cpu-exec: reset exit flag before calling cpu_exec_nocache, Paolo Bonzini, 2017/11/02