xen: Fix handling of GRUB chainloading.

In case of GRUB we put remapper after domain pages and not at 0x0.
In this case we use max_addr to put remapper. Unfortunately we increment
max_addr as well in this case resulting in virt mapping mapping page
at old max_addr and trying to boot using new max_addr.

Closes 46014.
This commit is contained in:
Vladimir Serbinenko 2017-02-07 00:42:43 +01:00
parent f3df8f961f
commit 8a96fc4093
1 changed files with 1 additions and 3 deletions

View File

@ -419,8 +419,6 @@ grub_xen_pt_alloc (void)
try_virt_end = ALIGN_UP (xen_state.xen_inf.virt_base +
page2offset (nr_need_pages) +
ADDITIONAL_SIZE + STACK_SIZE, ALIGN_SIZE);
if (!xen_state.xen_inf.virt_base)
try_virt_end += PAGE_SIZE;
err = get_pgtable_size (xen_state.xen_inf.virt_base, try_virt_end,
nr_info_pages);
@ -433,7 +431,7 @@ grub_xen_pt_alloc (void)
if (xen_state.xen_inf.virt_base)
err = get_pgtable_size (0, PAGE_SIZE, nr_need_pages);
else
err = get_pgtable_size (try_virt_end - PAGE_SIZE, try_virt_end,
err = get_pgtable_size (try_virt_end, try_virt_end + PAGE_SIZE,
nr_need_pages);
if (err)
return err;