On Tue, 12 Jan 2021 at 10:59, Rémi Denis-Courmont
<remi.denis.courmont@huawei.com> wrote:
>
> Hi,
>
> This adds Secure EL2.
>
> Changes since version 4:
> - Fix NS unitialised in secure state stage 2 translation.
> - Remove EEL2 translation block flag in 32-bit mode.
> - Clarify comments on arm_is_el2_enabled().
Looking through this patchset, it's practically ready and only
needs a couple of very tiny tweaks, so rather than asking you to
roll a v6, I'm just going to apply it to target-arm.next and
make the tweaks in the process:
* patch 6 needed adjustment on rebase as commit 00a92832f4532
has already added definitions of the ID_AA64PFR0 fields;
I dropped the now-duplicate part of the patch and adjusted
the commit message to match
* patch 17: added the change requested by RTH:
--- a/target/arm/translate.c
+++ b/target/arm/translate.c
@@ -2837,7 +2837,8 @@ static bool
msr_banked_access_decode(DisasContext *s, int r, int sysm, int rn,
*/
TCGv_i32 tcg_el;
- if (dc_isar_feature(aa64_sel2, s)) {
+ if (arm_dc_feature(s, ARM_FEATURE_AARCH64) &&
+ dc_isar_feature(aa64_sel2, s)) {
/* Target EL is EL<3 minus SCR_EL3.EEL2> */
tcg_el = load_cpu_field(cp15.scr_el3);
tcg_gen_sextract_i32(tcg_el, tcg_el, ctz32(SCR_EEL2), 1);
and corrected the patch subject line to
"target/arm: Implement SCR_EL2.EEL2"
thanks
-- PMM