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:
parent
f3df8f961f
commit
8a96fc4093
1 changed files with 1 additions and 3 deletions
|
@ -419,8 +419,6 @@ grub_xen_pt_alloc (void)
|
||||||
try_virt_end = ALIGN_UP (xen_state.xen_inf.virt_base +
|
try_virt_end = ALIGN_UP (xen_state.xen_inf.virt_base +
|
||||||
page2offset (nr_need_pages) +
|
page2offset (nr_need_pages) +
|
||||||
ADDITIONAL_SIZE + STACK_SIZE, ALIGN_SIZE);
|
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,
|
err = get_pgtable_size (xen_state.xen_inf.virt_base, try_virt_end,
|
||||||
nr_info_pages);
|
nr_info_pages);
|
||||||
|
@ -433,7 +431,7 @@ grub_xen_pt_alloc (void)
|
||||||
if (xen_state.xen_inf.virt_base)
|
if (xen_state.xen_inf.virt_base)
|
||||||
err = get_pgtable_size (0, PAGE_SIZE, nr_need_pages);
|
err = get_pgtable_size (0, PAGE_SIZE, nr_need_pages);
|
||||||
else
|
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);
|
nr_need_pages);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|
Loading…
Reference in a new issue