[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 01/19] tcg: Enhance flush_icache_range with separate data
From: |
Richard Henderson |
Subject: |
Re: [PATCH v2 01/19] tcg: Enhance flush_icache_range with separate data pointer |
Date: |
Tue, 3 Nov 2020 15:02:39 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
On 10/31/20 11:54 PM, Joelle van Dyne wrote:
> s->code_ptr and s->code_buf are 4 byte pointers on aarch64 so the
> cache flush is off by a factor of 4
>
> diff --git a/tcg/tcg.c b/tcg/tcg.c
> index 44b923f5fe..2c4b66965b 100644
> --- a/tcg/tcg.c
> +++ b/tcg/tcg.c
> @@ -4325,7 +4325,8 @@ int tcg_gen_code(TCGContext *s, TranslationBlock *tb)
>
> /* flush instruction cache */
> flush_idcache_range((uintptr_t)tcg_mirror_rw_to_rx(s->code_buf),
> - (uintptr_t)s->code_buf, s->code_ptr - s->code_buf);
> + (uintptr_t)s->code_buf,
> + (uintptr_t)s->code_ptr - (uintptr_t)s->code_buf);
Yep, thanks.
r~