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: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] target-arm: Break the TB after IC invalidation to execute self-modified code correctly
Date: Thu, 27 Aug 2015 17:54:17 +0100

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



reply via email to

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