[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: xen: Fix handling of GRUB chainloading.
From: |
Andrei Borzenkov |
Subject: |
Re: xen: Fix handling of GRUB chainloading. |
Date: |
Tue, 7 Feb 2017 14:43:20 +0100 |
I'm not familiar with code, so go ahead if you are sure it is bug fix.
Отправлено с iPhone
> 7 февр. 2017 г., в 0:50, Vladimir 'phcoder' Serbinenko <address@hidden>
> написал(а):
>
> 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.
>
> Daniel, Andrei, Alexander, do you agree that it should go into 2.02?
>
> Closes 46014.
> ---
> grub-core/loader/i386/xen.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/grub-core/loader/i386/xen.c b/grub-core/loader/i386/xen.c
> index 51d1ddd..3073f64 100644
> --- a/grub-core/loader/i386/xen.c
> +++ b/grub-core/loader/i386/xen.c
> @@ -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;
> --
> 2.9.3
>
> _______________________________________________
> Grub-devel mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/grub-devel