qemu-devel
[Top][All Lists]
Advanced

[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~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]