[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 5/5] target/arm: only perform TCG cpu and machine inits if TC
From: |
Fabiano Rosas |
Subject: |
Re: [PATCH 5/5] target/arm: only perform TCG cpu and machine inits if TCG enabled |
Date: |
Mon, 19 Dec 2022 12:16:09 -0300 |
Richard Henderson <richard.henderson@linaro.org> writes:
> On 12/16/22 13:29, Fabiano Rosas wrote:
>> - /*
>> - * Misaligned thumb pc is architecturally impossible.
>> - * We have an assert in thumb_tr_translate_insn to verify this.
>> - * Fail an incoming migrate to avoid this assert.
>> - */
>> - if (!is_a64(env) && env->thumb && (env->regs[15] & 1)) {
>> - return -1;
>> - }
>> + /*
>> + * Misaligned thumb pc is architecturally impossible.
>> + * We have an assert in thumb_tr_translate_insn to verify this.
>> + * Fail an incoming migrate to avoid this assert.
>> + */
>> + if (!is_a64(env) && env->thumb && (env->regs[15] & 1)) {
>> + return -1;
>> + }
>
> This is a sanity check rejecting malformed vmsave. While hw virt won't have
> the same
> assert as mentioned in the comment, it won't be happy and will raise some
> sort of cpu
> exception later. I think it's better to reject the bad vmload early. I
> suppose we could
> expand the comment to that effect, so that it doesn't appear to be wholly tcg
> inspired.
I see, I'll leave it out of tcg_enabled() and update the comment.
> Otherwise,
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
>
>
> r~
- Re: [PATCH 1/5] target/arm: only build psci for TCG, (continued)
[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
[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