x86/xen: compactly store large identity ranges in the p2m
authorDavid Vrabel <david.vrabel@citrix.com>
Tue, 7 Jan 2014 11:44:32 +0000 (11:44 +0000)
committerDavid Vrabel <david.vrabel@citrix.com>
Thu, 15 May 2014 15:14:44 +0000 (16:14 +0100)
commit3cb83e46d032505016ab2565f067e24c8cba9a9d
tree11eee2d731dd1fa83bede6f006736ff246082b47
parenta9b5bff66b2a63f7d0f42434f5da9024b442159c
x86/xen: compactly store large identity ranges in the p2m

Large (multi-GB) identity ranges currently require a unique middle page
(filled with p2m_identity entries) per 1 GB region.

Similar to the common p2m_mid_missing middle page for large missing
regions, introduce a p2m_mid_identity page (filled with p2m_identity
entries) which can be used instead.

set_phys_range_identity() thus only needs to allocate new middle pages
at the beginning and end of the range.

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