All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: "Alex Bennée" <alex.bennee@linaro.org>
Cc: qemu-devel@nongnu.org, peter.maydell@linaro.org, cota@braap.org
Subject: Re: [Qemu-devel] [PATCH 2/4] target/arm: Rebuild hflags at el changes and MSR writes
Date: Tue, 19 Feb 2019 07:10:31 -0800	[thread overview]
Message-ID: <4f6114d9-eef6-e889-8756-74db559a4a20@linaro.org> (raw)
In-Reply-To: <87bm376dh7.fsf@zen.linaroharston>

On 2/19/19 6:48 AM, Alex Bennée wrote:
>> +++ b/target/arm/translate-a64.c
>> @@ -1841,11 +1841,15 @@ static void handle_sys(DisasContext *s, uint32_t insn, bool isread,
>>          /* I/O operations must end the TB here (whether read or write) */
>>          gen_io_end();
>>          s->base.is_jmp = DISAS_UPDATE;
>> -    } else if (!isread && !(ri->type & ARM_CP_SUPPRESS_TB_END)) {
>> +    }
>> +    if (!isread && !(ri->type & ARM_CP_SUPPRESS_TB_END)) {
> Does this potentially introduce a icount bug (or fix an existing bug)?
> 
>>          /* We default to ending the TB on a coprocessor register write,
>>           * but allow this to be suppressed by the register definition
>>           * (usually only necessary to work around guest bugs).
>>           */
>> +        TCGv_i32 tcg_el = tcg_const_i32(s->current_el);
>> +        gen_helper_rebuild_hflags_a64(cpu_env, tcg_el);
>> +        tcg_temp_free_i32(tcg_el);
>>          s->base.is_jmp = DISAS_UPDATE;
>>      }

Neither.

Previously, all that was required was that either icount or !SUPPRESS_TB_END
and a TB, and that was done simply by setting DISAS_UPDATE.  Which both if
blocks did.

Now, icount ends a TB (still by setting DISAS_UPDATE).  But if !SUPPRESS_TB_END
then we must also rebuild hflags (with a possible harmless double-set of
DISAS_UPDATE).


r~

  reply	other threads:[~2019-02-19 15:11 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-14  4:06 [Qemu-devel] [PATCH 0/4] target/arm: Reduce overhead of cpu_get_tb_cpu_state Richard Henderson
2019-02-14  4:06 ` [Qemu-devel] [PATCH 1/4] target/arm: Split out recompute_hflags et al Richard Henderson
2019-02-19 11:06   ` Alex Bennée
2019-02-19 15:06     ` Richard Henderson
2019-02-14  4:06 ` [Qemu-devel] [PATCH 2/4] target/arm: Rebuild hflags at el changes and MSR writes Richard Henderson
2019-02-19 14:48   ` Alex Bennée
2019-02-19 15:10     ` Richard Henderson [this message]
2019-02-19 19:43   ` Alex Bennée
2019-02-14  4:06 ` [Qemu-devel] [PATCH 3/4] target/arm: Assert hflags is correct in cpu_get_tb_cpu_state Richard Henderson
2019-02-19 14:53   ` Alex Bennée
2019-02-19 15:23   ` Alex Bennée
2019-02-14  4:06 ` [Qemu-devel] [PATCH 4/4] target/arm: Rely on hflags " Richard Henderson
2019-02-19 20:17   ` Alex Bennée
2019-02-19 22:40     ` Richard Henderson
2019-02-14 10:28 ` [Qemu-devel] [PATCH 0/4] target/arm: Reduce overhead of cpu_get_tb_cpu_state Laurent Desnogues
2019-02-14 11:05 ` Alex Bennée
2019-02-14 17:05 ` Emilio G. Cota

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=4f6114d9-eef6-e889-8756-74db559a4a20@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=alex.bennee@linaro.org \
    --cc=cota@braap.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.