From: Richard Henderson <rth@twiddle.net>
To: sergey.fedorov@linaro.org, qemu-devel@nongnu.org
Cc: Sergey Fedorov <serge.fdrv@gmail.com>,
Peter Crosthwaite <crosthwaite.peter@gmail.com>,
Paolo Bonzini <pbonzini@redhat.com>
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 [thread overview]
Message-ID: <56EAF001.2050303@twiddle.net> (raw)
In-Reply-To: <1458222382-6498-4-git-send-email-sergey.fedorov@linaro.org>
On 03/17/2016 06:46 AM, sergey.fedorov@linaro.org wrote:
> From: Paolo Bonzini <pbonzini@redhat.com>
>
> Simple code simplification.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Sergey Fedorov <sergey.fedorov@linaro.org>
> ---
> 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~
next prev parent reply other threads:[~2016-03-17 17:57 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-17 13:46 [Qemu-devel] [PATCH 0/5] tcg: Misc clean-up patches from Paolo sergey.fedorov
2016-03-17 13:46 ` [Qemu-devel] [PATCH 1/5] tcg: code_bitmap is not used by user-mode emulation sergey.fedorov
2016-03-17 14:56 ` Peter Maydell
2016-03-17 15:03 ` Sergey Fedorov
2016-03-17 13:46 ` [Qemu-devel] [PATCH 2/5] tcg: reorganize tb_find_physical loop sergey.fedorov
2016-03-17 14:59 ` Peter Maydell
2016-03-22 14:59 ` Alex Bennée
2016-03-22 15:00 ` Paolo Bonzini
2016-03-29 13:19 ` Sergey Fedorov
2016-03-29 13:26 ` Paolo Bonzini
2016-03-29 14:05 ` Sergey Fedorov
2016-03-29 14:26 ` Alex Bennée
2016-03-29 14:37 ` Sergey Fedorov
2016-03-17 13:46 ` [Qemu-devel] [PATCH 3/5] tcg: always keep jump target and tb->jmp_next consistent sergey.fedorov
2016-03-17 17:57 ` Richard Henderson [this message]
2016-03-17 19:31 ` Paolo Bonzini
2016-03-17 20:45 ` Sergey Fedorov
2016-03-17 20:46 ` Richard Henderson
2016-03-18 10:29 ` Sergey Fedorov
2016-03-18 10:32 ` Sergey Fedorov
2016-03-17 13:46 ` [Qemu-devel] [PATCH 4/5] tcg: reorder removal from lists in tb_phys_invalidate sergey.fedorov
2016-03-17 15:09 ` Paolo Bonzini
2016-03-17 15:14 ` Sergey Fedorov
2016-03-28 15:18 ` Sergey Fedorov
2016-03-28 21:21 ` Paolo Bonzini
2016-03-29 10:03 ` Sergey Fedorov
2016-03-29 10:37 ` Paolo Bonzini
2016-03-29 12:31 ` Sergey Fedorov
2016-03-29 13:43 ` Alex Bennée
2016-04-14 14:45 ` Sergey Fedorov
2016-04-14 15:13 ` Paolo Bonzini
2016-04-14 15:36 ` Sergey Fedorov
2016-04-14 17:27 ` Paolo Bonzini
2016-04-14 18:29 ` Sergey Fedorov
2016-04-14 18:37 ` Sergey Fedorov
2016-03-28 18:42 ` Sergey Fedorov
2016-03-28 20:58 ` Paolo Bonzini
2016-03-29 0:17 ` Richard Henderson
2016-03-17 13:46 ` [Qemu-devel] [PATCH 5/5] tcg: move tb_invalidated_flag to CPUState sergey.fedorov
2016-03-22 15:07 ` Alex Bennée
2016-03-22 15:11 ` Sergey Fedorov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56EAF001.2050303@twiddle.net \
--to=rth@twiddle.net \
--cc=crosthwaite.peter@gmail.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=serge.fdrv@gmail.com \
--cc=sergey.fedorov@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).