[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH v2 04/22] target/arm: Implement ALLINT MSR (immediate)
From: |
Richard Henderson |
Subject: |
Re: [RFC PATCH v2 04/22] target/arm: Implement ALLINT MSR (immediate) |
Date: |
Thu, 22 Feb 2024 09:42:15 -1000 |
User-agent: |
Mozilla Thunderbird |
On 2/21/24 10:41, Richard Henderson wrote:
Ho hum.. I just noticed that TALLINT only traps immediate write of 1, not also immediate
write of 0. So one helper for both MSR Xt and MSR imm is not practical.
Quick follow up to say that means you can do
static bool trans_MSR_i_ALLINT(DisasContext *s, arg_i *a)
{
if (!dc_isar_feature(aa64_nmi, s)
|| s->current_el == 0
|| (a->imm & ~1)) {
return false;
}
if (!a->imm) {
clear_pstate_bits(PSTATE_ALLINT);
} else if (arm_dc_feature(s, ARM_FEATURE_EL2) && s->current_el == 1) {
/* Use helper for runtime check against HCRX_EL2.TALLINT. */
gen_helper_msr_set_allint_el1(tcg_env);
} else {
set_pstate_bits(PSTATE_ALLINT);
}
return true;
}
Generate inline bit ops whenever TALLINT does not apply.
This also means the helper need not check current_el, because we've already
done it here.
r~