Skip to content

VTCR fields are not checked when building parameters for aarch64 secure EL2 page table walk

When collecting various parameters for LPAE page table walks in aa64_va_parameters, we call regime_tcr to get the effective TCR for the current EL/Secure state (TCR_EL1/TCR_EL2/TCR_EL2/VTCR_EL2/VSTCR_EL2), and then we extract various fields from it. For example, the DS field.

Specifically in the case of Stage 2, regime_tcr returns either VTCR_EL2 or VSTCR_EL2 based on the secure state, but unlike the other *TCRs, VSTCR_EL2 is missing some of the fields that we query (including the DS field), and based on the ARM arm, these should be extracted from VTCR_EL2 instead.

This means that at the moment, all of the features that are gated behind the fields that should be queried from VTCR_EL2 (DS, T0SZ, SL0, SL2, PS, IRGN0, ORGN0, SH0, HA, HD) are impossible to enable in SEL2 on QEMU.

FYI @pm215

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information