> On 13 Jan 2023, at 10:11, Julien Grall <jul...@xen.org> wrote: > > From: Julien Grall <jgr...@amazon.com> > > Xen is currently not fully compliant with the Arm Arm because it will > switch the TTBR with the MMU on. > > In order to be compliant, we need to disable the MMU before > switching the TTBR. The implication is the page-tables should > contain an identity mapping of the code switching the TTBR. > > In most of the case we expect Xen to be loaded in low memory. I am aware > of one platform (i.e AMD Seattle) where the memory start above 512GB. > To give us some slack, consider that Xen may be loaded in the first 2TB > of the physical address space. > > The memory layout is reshuffled to keep the first two slots of the zeroeth > level free. Xen will now be loaded at (2TB + 2MB). This requires a slight > tweak of the boot code because XEN_VIRT_START cannot be used as an > immediate. > > This reshuffle will make trivial to create a 1:1 mapping when Xen is > loaded below 2TB. > > Signed-off-by: Julien Grall <jgr...@amazon.com> > ----
Reviewed-by: Luca Fancellu <luca.fance...@arm.com> I’ve also built for arm64 and test this patch on fvp, booting Dom0 and creating/running/destroying some guests Tested-by: Luca Fancellu <luca.fance...@arm.com>