From: Sergey Fedorov <serge.fdrv@gmail.com>
To: "Alex Bennée" <alex.bennee@linaro.org>,
"Sergey Fedorov" <sergey.fedorov@linaro.org>
Cc: qemu-devel@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>,
Peter Crosthwaite <crosthwaite.peter@gmail.com>,
Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH v6 6/6] cpu-exec: Move TB chaining into tb_find_fast()
Date: Fri, 29 Apr 2016 16:58:25 +0300 [thread overview]
Message-ID: <57236881.9020906@gmail.com> (raw)
In-Reply-To: <87d1p8ed0w.fsf@linaro.org>
On 29/04/16 16:54, Alex Bennée wrote:
> Sergey Fedorov <sergey.fedorov@linaro.org> writes:
>> diff --git a/cpu-exec.c b/cpu-exec.c
>> index f49a436e1a5a..5f23c0660d6e 100644
>> --- a/cpu-exec.c
>> +++ b/cpu-exec.c
>> @@ -320,7 +320,9 @@ found:
>> return tb;
>> }
>>
>> -static inline TranslationBlock *tb_find_fast(CPUState *cpu)
>> +static inline TranslationBlock *tb_find_fast(CPUState *cpu,
>> + TranslationBlock **last_tb,
>> + int tb_exit)
>> {
>> CPUArchState *env = (CPUArchState *)cpu->env_ptr;
>> TranslationBlock *tb;
>> @@ -331,11 +333,24 @@ static inline TranslationBlock *tb_find_fast(CPUState *cpu)
>> always be the same before a given translated block
>> is executed. */
>> cpu_get_tb_cpu_state(env, &pc, &cs_base, &flags);
>> + tb_lock();
>> tb = cpu->tb_jmp_cache[tb_jmp_cache_hash_func(pc)];
>> if (unlikely(!tb || tb->pc != pc || tb->cs_base != cs_base ||
>> tb->flags != flags)) {
>> tb = tb_find_slow(cpu, pc, cs_base, flags);
>> }
>> + if (cpu->tb_flushed) {
>> + /* Ensure that no TB jump will be modified as the
>> + * translation buffer has been flushed.
>> + */
>> + *last_tb = NULL;
>> + cpu->tb_flushed = false;
>> + }
>> + /* See if we can patch the calling TB. */
>> + if (*last_tb && qemu_loglevel_mask(CPU_LOG_TB_NOCHAIN)) {
> This should be !qemu_loglevel_mask(CPU_LOG_TB_NOCHAIN)
Probably, it's mine rebase conflict resolution mistake. Nice catch, thanks!
Kind regards,
Sergey
>
>> + tb_add_jump(*last_tb, tb_exit, tb);
>> + }
>> + tb_unlock();
>> return tb;
>> }
next prev parent reply other threads:[~2016-04-29 13:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-28 22:10 [Qemu-devel] [PATCH v6 0/6] tcg: Misc clean-up patches Sergey Fedorov
2016-04-28 22:10 ` [Qemu-devel] [PATCH v6 1/6] tcg: code_bitmap is not used by user-mode emulation Sergey Fedorov
2016-04-28 22:10 ` [Qemu-devel] [PATCH v6 2/6] tcg: reorganize tb_find_physical loop Sergey Fedorov
2016-04-28 22:10 ` [Qemu-devel] [PATCH v6 3/6] cpu-exec: elide more icount code if CONFIG_USER_ONLY Sergey Fedorov
2016-04-28 22:10 ` [Qemu-devel] [PATCH v6 4/6] tcg: Clean up from 'next_tb' Sergey Fedorov
2016-04-28 22:10 ` [Qemu-devel] [PATCH v6 5/6] tcg: Rework tb_invalidated_flag Sergey Fedorov
2016-04-28 22:10 ` [Qemu-devel] [PATCH v6 6/6] cpu-exec: Move TB chaining into tb_find_fast() Sergey Fedorov
2016-04-29 13:54 ` Alex Bennée
2016-04-29 13:58 ` Sergey Fedorov [this message]
2016-04-29 16:32 ` Richard Henderson
2016-04-29 19:05 ` 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=57236881.9020906@gmail.com \
--to=serge.fdrv@gmail.com \
--cc=alex.bennee@linaro.org \
--cc=crosthwaite.peter@gmail.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
--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).