Re: [PATCH] arm64: Clear VTCR_EL2 in __init_el2_stage2()

From: Anshuman Khandual

Date: Fri Mar 13 2026 - 04:42:52 EST




On 13/03/26 1:41 PM, Marc Zyngier wrote:
> On Fri, 13 Mar 2026 07:54:04 +0000,
> Anshuman Khandual <anshuman.khandual@xxxxxxx> wrote:
>>
>> But it can be argued that these registers
>> need not have to be cleared now and can just be initialised before
>> setting up HCR_EL2_VM itself. In which case should we drop
>> __init_el2_stage2() entirely ?
>
> And something worth thinking of: the role of VTTBR_EL2.VMID when
> HCR_EL2.VM is 0.

Are you suggesting that VTTBR_EL2_VMID needs to be 0 even when
HCR_EL2_VM = 0 because of its corresponding TLB entries ? But
during system boot such possibilities might not really exist ?