[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 3/5] tcg: always keep jump target and tb->jmp_ne
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH 3/5] tcg: always keep jump target and tb->jmp_next consistent |
Date: |
Thu, 17 Mar 2016 10:57:21 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 |
On 03/17/2016 06:46 AM, address@hidden wrote:
> From: Paolo Bonzini <address@hidden>
>
> Simple code simplification.
>
> Signed-off-by: Paolo Bonzini <address@hidden>
> Signed-off-by: Sergey Fedorov <address@hidden>
> ---
> translate-all.c | 19 +++++++++----------
> 1 file changed, 9 insertions(+), 10 deletions(-)
>
> diff --git a/translate-all.c b/translate-all.c
> index f17ace1ae899..a1ac9841de48 100644
> --- a/translate-all.c
> +++ b/translate-all.c
> @@ -927,6 +927,14 @@ static inline void tb_page_remove(TranslationBlock
> **ptb, TranslationBlock *tb)
> }
> }
>
> +/* reset the jump entry 'n' of a TB so that it is not chained to
> + another TB */
> +static inline void tb_reset_jump(TranslationBlock *tb, int n)
> +{
> + tb_set_jmp_target(tb, n, (uintptr_t)(tb->tc_ptr +
> tb->tb_next_offset[n]));
> + tb->jmp_next[n] = NULL;
> +}
> +
> static inline void tb_jmp_remove(TranslationBlock *tb, int n)
> {
> TranslationBlock *tb1, **ptb;
> @@ -951,18 +959,10 @@ static inline void tb_jmp_remove(TranslationBlock *tb,
> int n)
> }
> /* now we can suppress tb(n) from the list */
> *ptb = tb->jmp_next[n];
> -
> - tb->jmp_next[n] = NULL;
> + tb_reset_jump(tb, n);
What's the motivation here? This implies an extra cache flush.
Where were we resetting the jump previously? Or is this a bug
in that we *weren't* resetting the jump previously?
r~
[Qemu-devel] [PATCH 5/5] tcg: move tb_invalidated_flag to CPUState, sergey . fedorov, 2016/03/17
[Qemu-devel] [PATCH 2/5] tcg: reorganize tb_find_physical loop, sergey . fedorov, 2016/03/17