hvmloader: Change memory relocation loop when overlap with PCI hole
authorJean Guyader <jean.guyader@eu.citrix.com>
Fri, 18 Nov 2011 13:42:46 +0000 (13:42 +0000)
committerJean Guyader <jean.guyader@eu.citrix.com>
Fri, 18 Nov 2011 13:42:46 +0000 (13:42 +0000)
commite51e2e0e581b91a61835413c3bfa5b46426825f7
tree2ff803e5260f0ff933b48de402a22358ee940d88
parenta04811a315e059101fa3b3303e75b97eac7c5c95
hvmloader: Change memory relocation loop when overlap with PCI hole

Change the way we relocate the memory page if they overlap with pci
hole.  Use new map space (XENMAPSPACE_gmfn_range) to move the loop
into xen.

This code usually get triggered when a device is pass through to a
guest and the PCI hole has to be extended to have enough room to map
the device BARs.  The PCI hole will starts lower and it might overlap
with some RAM that has been alocated for the guest. That usually
happen if the guest has more than 4G of RAM.  We have to relocate
those pages in high mem otherwise they won't be accessible.

Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
tools/firmware/hvmloader/pci.c