On 10/18/18 1:27 PM, Aaron Lindsay wrote: > On Oct 18 11:27, Richard Henderson wrote: >> @@ -2761,12 +2763,12 @@ static const ARMCPRegInfo vmsa_cp_reginfo[] = { >> .fieldoffset = offsetof(CPUARMState, cp15.esr_el[1]), .resetvalue = >> 0, }, >> { .name = "TTBR0_EL1", .state = ARM_CP_STATE_BOTH, >> .opc0 = 3, .opc1 = 0, .crn = 2, .crm = 0, .opc2 = 0, >> - .access = PL1_RW, .writefn = vmsa_ttbr_write, .resetvalue = 0, >> + .access = PL1_RW, .writefn = vmsa_ttbr1_write, .resetvalue = 0, > > It's a little confusing that vmsa_ttbr1_write is used for TTBR0_EL1. Is > the '1' indicating the EL instead of which TTBR is being used?
Yes. Perhaps I should have included "_el" in the symbol for clarity. I expect to add a different function (vmsr_ttbr_el2_write?), for TTBR{0,1}_EL2, which will also check HCR_EL2.E2H, when I get around to implementing ARMv8.1-VHE. r~