All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabiano Rosas <farosas@suse.de>
To: Richard Henderson <richard.henderson@linaro.org>, qemu-devel@nongnu.org
Cc: qemu-arm@nongnu.org, "Peter Maydell" <peter.maydell@linaro.org>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Claudio Fontana" <cfontana@suse.de>,
	"Eduardo Habkost" <ehabkost@redhat.com>
Subject: Re: [PATCH 3/5] target/arm: wrap semihosting and psci calls with tcg_enabled
Date: Mon, 19 Dec 2022 08:54:33 -0300	[thread overview]
Message-ID: <87o7rz8v7q.fsf@suse.de> (raw)
In-Reply-To: <7f555a78-1533-7be6-f627-6e594a19c04d@linaro.org>

Richard Henderson <richard.henderson@linaro.org> writes:

> On 12/16/22 13:29, Fabiano Rosas wrote:
>> -    if (arm_is_psci_call(cpu, cs->exception_index)) {
>> -        arm_handle_psci_call(cpu);
>> -        qemu_log_mask(CPU_LOG_INT, "...handled as PSCI call\n");
>> -        return;
>> -    }
>> +    if (tcg_enabled()) {
>> +        if (arm_is_psci_call(cpu, cs->exception_index)) {
>
> This could be
>
>      if (tcg_enabled() && arm_is_psci_call(...))
>
> because...
>
>> -    /*
>> -     * Semihosting semantics depend on the register width of the code
>> -     * that caused the exception, not the target exception level, so
>> -     * must be handled here.
>> -     */
>> +        /*
>> +         * Semihosting semantics depend on the register width of the code
>> +         * that caused the exception, not the target exception level, so
>> +         * must be handled here.
>> +         */
>>   #ifdef CONFIG_TCG
>> -    if (cs->exception_index == EXCP_SEMIHOST) {
>> -        tcg_handle_semihosting(cs);
>> -        return;
>> -    }
>> +        if (cs->exception_index == EXCP_SEMIHOST) {
>
> If you were able to replace the ifdef, that would be one thing, but since you aren't I 
> don't think this requires a separate check.  There is no way to generate EXCP_SEMIHOST 
> except via TCG.

Right, I had to keep the ifdef that was being removed in the original
patch because tcg_handle_semihosting had moved elsewhere in Claudio's
series.

>
> I guess I don't insist, since you're working toward Claudio's much larger patch set, so
>
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

If you don't mind I'll leave like this then, unless this comes to a v2.

Thank you


  reply	other threads:[~2022-12-19 11:55 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-16 21:29 [PATCH 0/5] target/arm: Some CONFIG_TCG code movement Fabiano Rosas
2022-12-16 21:29 ` [PATCH 1/5] target/arm: only build psci for TCG Fabiano Rosas
2022-12-16 21:59   ` Alexander Graf
2022-12-19  8:37     ` Claudio Fontana
2022-12-19 10:47       ` Alexander Graf
2022-12-19 10:55         ` Claudio Fontana
2022-12-19 11:42           ` Fabiano Rosas
2022-12-20  7:31             ` Alexander Graf
2022-12-20 13:53               ` Fabiano Rosas
2022-12-20 17:04                 ` Alexander Graf
2022-12-20 19:52                   ` Fabiano Rosas
2022-12-16 21:29 ` [PATCH 2/5] target/arm: rename handle_semihosting to tcg_handle_semihosting Fabiano Rosas
2022-12-17  0:02   ` Richard Henderson
2022-12-16 21:29 ` [PATCH 3/5] target/arm: wrap semihosting and psci calls with tcg_enabled Fabiano Rosas
2022-12-17  0:13   ` Richard Henderson
2022-12-19 11:54     ` Fabiano Rosas [this message]
2022-12-16 21:29 ` [PATCH 4/5] target/arm: wrap call to aarch64_sve_change_el in tcg_enabled() Fabiano Rosas
2022-12-16 21:29 ` [PATCH 5/5] target/arm: only perform TCG cpu and machine inits if TCG enabled Fabiano Rosas
2022-12-17  0:20   ` Richard Henderson
2022-12-19 15:16     ` Fabiano Rosas

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=87o7rz8v7q.fsf@suse.de \
    --to=farosas@suse.de \
    --cc=alex.bennee@linaro.org \
    --cc=cfontana@suse.de \
    --cc=ehabkost@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@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 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.