]> Pileus Git - ~andy/linux/commit
xen: release all pages within 1-1 p2m mappings
authorDavid Vrabel <david.vrabel@citrix.com>
Wed, 28 Sep 2011 16:46:36 +0000 (17:46 +0100)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Thu, 29 Sep 2011 15:12:15 +0000 (11:12 -0400)
commitf3f436e33b925ead21e3f9b47b1e2aed965511d9
tree1911bb6a8f38433e8c685581766a0d2a20ddf03a
parentdc91c728fddc29dfed1ae96f6807216b5f42d3a1
xen: release all pages within 1-1 p2m mappings

In xen_memory_setup() all reserved regions and gaps are set to an
identity (1-1) p2m mapping.  If an available page has a PFN within one
of these 1-1 mappings it will become inaccessible (as it MFN is lost)
so release them before setting up the mapping.

This can make an additional 256 MiB or more of RAM available
(depending on the size of the reserved regions in the memory map) if
the initial pages overlap with reserved regions.

The 1:1 p2m mappings are also extended to cover partial pages.  This
fixes an issue with (for example) systems with a BIOS that puts the
DMI tables in a reserved region that begins on a non-page boundary.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
arch/x86/xen/setup.c