Hi Julien, > -----Original Message----- > Subject: [PATCH v7 4/5] xen/arm64: mm: Rework switch_ttbr() > > From: Julien Grall <jgr...@amazon.com> > > At the moment, switch_ttbr() is switching the TTBR whilst the MMU is > still on. > > Switching TTBR is like replacing existing mappings with new ones. So > we need to follow the break-before-make sequence. > > In this case, it means the MMU needs to be switched off while the > TTBR is updated. In order to disable the MMU, we need to first > jump to an identity mapping. > > Rename switch_ttbr() to switch_ttbr_id() and create an helper on > top to temporary map the identity mapping and call switch_ttbr() > via the identity address. > > switch_ttbr_id() is now reworked to temporarily turn off the MMU > before updating the TTBR. > > We also need to make sure the helper switch_ttbr() is part of the > identity mapping. So move _end_boot past it. > > The arm32 code will use a different approach. So this issue is for now > only resolved on arm64. > > Signed-off-by: Julien Grall <jgr...@amazon.com> > Reviewed-by: Luca Fancellu <luca.fance...@arm.com> > Reviewed-by: Michal Orzel <michal.or...@amd.com> > Reviewed-by: Bertrand Marquis <bertrand.marq...@arm.com>
I used the test method described in my notes from patch#2, and this patch passed the test, so: Tested-by: Henry Wang <henry.w...@arm.com> Kind regards, Henry