x86/dom0: Avoid using 1G superpages if shadowing may be necessary
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 9 Nov 2018 14:14:08 +0000 (14:14 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 12 Nov 2018 11:26:04 +0000 (11:26 +0000)
commit96f6ee15ad7ca96472779fc5c083b4149495c584
treee1957aa21105694819528d4bf771443d0f436b31
parent28f1c549e77144b61ef315a75b33f6cbc67a73b1
x86/dom0: Avoid using 1G superpages if shadowing may be necessary

The shadow code doesn't support 1G superpages, and will hand #PF[RSVD] back to
guests.

For dom0's with 512GB of RAM or more (and subject to the P2M alignment), Xen's
domain builder might use 1G superpages.

Avoid using 1G superpages (falling back to 2M superpages instead) if there is
a reasonable chance that we may have to shadow dom0.  This assumes that there
are no circumstances where we will activate logdirty mode on dom0.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/pv/dom0_build.c