qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] target-arm: Break the TB after IC invalidation


From: Sergey Sorokin
Subject: Re: [Qemu-devel] [PATCH] target-arm: Break the TB after IC invalidation to execute self-modified code correctly
Date: Fri, 28 Aug 2015 09:55:12 +0300

27.08.2015, 19:54, "Peter Maydell" <address@hidden>:
> On 26 August 2015 at 12:36, Sergey Sorokin <address@hidden> wrote:
>>  If any store instruction writes the code inside the same TB
>>  after this store insn, the execution of the TB must be stopped
>>  to execute new code correctly.
>>  As described in ARMv8 manual D3.4.6 a self-modified code need to do
>>  IC invalidation to be valid. So it's enough to end the TB
>>  after IC invalidation instruction on the code translation.
>
> I think it would be better to fix this problem by requiring
> that we end the TB on every ISB instruction. We need to do
> that anyway, because the v8 ARM ARM D1.14.4 says that we
> must take interrupts immediately after an ISB. And if you have
> self-modifying code then you'll need to put an ISB between
> the store and the execution, so it will deal with your bug too.
>
> thanks
> -- PMM

Such was the first internal version of the patch, but I altered it before the 
sending :) Ok, I'll bring back this solution.



reply via email to

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