[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 3/5] target/arm: wrap semihosting and psci calls with tcg_ena
From: |
Richard Henderson |
Subject: |
Re: [PATCH 3/5] target/arm: wrap semihosting and psci calls with tcg_enabled |
Date: |
Fri, 16 Dec 2022 16:13:45 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 |
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.
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>
r~
- Re: [PATCH 1/5] target/arm: only build psci for TCG, (continued)
- Re: [PATCH 1/5] target/arm: only build psci for TCG, Alexander Graf, 2022/12/19
- Re: [PATCH 1/5] target/arm: only build psci for TCG, Claudio Fontana, 2022/12/19
- Re: [PATCH 1/5] target/arm: only build psci for TCG, Fabiano Rosas, 2022/12/19
- Re: [PATCH 1/5] target/arm: only build psci for TCG, Alexander Graf, 2022/12/20
- Re: [PATCH 1/5] target/arm: only build psci for TCG, Fabiano Rosas, 2022/12/20
- Re: [PATCH 1/5] target/arm: only build psci for TCG, Alexander Graf, 2022/12/20
- Re: [PATCH 1/5] target/arm: only build psci for TCG, Fabiano Rosas, 2022/12/20
[PATCH 2/5] target/arm: rename handle_semihosting to tcg_handle_semihosting, Fabiano Rosas, 2022/12/16
[PATCH 3/5] target/arm: wrap semihosting and psci calls with tcg_enabled, Fabiano Rosas, 2022/12/16
- Re: [PATCH 3/5] target/arm: wrap semihosting and psci calls with tcg_enabled,
Richard Henderson <=
[PATCH 4/5] target/arm: wrap call to aarch64_sve_change_el in tcg_enabled(), Fabiano Rosas, 2022/12/16
[PATCH 5/5] target/arm: only perform TCG cpu and machine inits if TCG enabled, Fabiano Rosas, 2022/12/16