• Juergen Gross's avatar
    xen: split counting of extra memory pages from remapping · 5097cdf6
    Juergen Gross authored
    Memory pages in the initial memory setup done by the Xen hypervisor
    conflicting with the target E820 map are remapped. In order to do this
    those pages are counted and remapped in xen_set_identity_and_remap().
    
    Split the counting from the remapping operation to be able to setup
    the needed memory sizes in time but doing the remap operation at a
    later time. This enables us to simplify the interface to
    xen_set_identity_and_remap() as the number of remapped and released
    pages is no longer needed here.
    
    Finally move the remapping further down to prepare relocating
    conflicting memory contents before the memory might be clobbered by
    xen_set_identity_and_remap(). This requires to not destroy the Xen
    E820 map when the one for the system is being constructed.
    Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
    Acked-by: default avatarKonrad Rzeszutek Wilk <Konrad.wilk@oracle.com>
    Signed-off-by: default avatarDavid Vrabel <david.vrabel@citrix.com>
    5097cdf6
setup.c 24.1 KB