xen/arm: p2m: configure stage-2 page table to support upto 42-bit PA systems
authorVishnu Pajjuri OS <vishnu@os.amperecomputing.com>
Thu, 30 May 2019 07:59:46 +0000 (07:59 +0000)
committerJulien Grall <julien.grall@arm.com>
Thu, 6 Jun 2019 15:48:13 +0000 (16:48 +0100)
commit896ebdfa3a85f083c93bec8ae80a535c0e50f47e
tree4cef92733e67fcbcfc0935e7f86bca86c17f7436
parent93099a4afccff96fc29176baba745f687cee1a8f
xen/arm: p2m: configure stage-2 page table to support upto 42-bit PA systems

At the moment, on platform supporting 42-bit PA, Xen will only expose
40-bit worth of IPA to all domains.

The limitation was to prevent allocating too much memory for the root
page tables as those platforms only support 3-levels page-tables. At the
time, this was deemed acceptable because none of the platforms had
address wired above 40-bits.

However, newer platforms take advantage of the full address space. This
will result to break Dom0 boot as it can't access anything above 40-bit.

The only way to support 42-bit IPA is to allocate 8 pages for the root
page-tables. This is a bit a waste of memory as Xen does not offer
per-guest stage-2 configuration. But it is considered acceptable as
current platforms support 42-bit PA have a lot of memory.

In the future, we may want to consider per-guest stage-2 configuration
to reduce the waste.

Signed-off-by: Feng Kan <fengkan@os.amperecomputing.com>
Signed-off-by: Vishnu <vishnu@os.amperecomputing.com>
[julien: rework commit message]
Acked-by: Julien Grall <julien.grall@arm.com>
xen/arch/arm/p2m.c