[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 05/27] xen/mm: Use typesafe MFN for alloc_boot_pages return



>>> On 14.08.17 at 16:23, <julien.grall@xxxxxxx> wrote:
> --- a/xen/arch/x86/mm.c
> +++ b/xen/arch/x86/mm.c
> @@ -200,7 +200,7 @@ static void __init init_frametable_chunk(void *start, 
> void *end)
>           */
>          while ( step && s + (step << PAGE_SHIFT) > e + (4 << PAGE_SHIFT) )
>              step >>= PAGETABLE_ORDER;
> -        mfn = alloc_boot_pages(step, step);
> +        mfn = mfn_x(alloc_boot_pages(step, step));
>          map_pages_to_xen(s, mfn, step, PAGE_HYPERVISOR);

I think overall it would be better if mfn had its type changed here.

> --- a/xen/arch/x86/srat.c
> +++ b/xen/arch/x86/srat.c
> @@ -193,7 +193,7 @@ void __init acpi_numa_slit_init(struct acpi_table_slit 
> *slit)
>                      "Not used.\n");
>               return;
>       }
> -     mfn = alloc_boot_pages(PFN_UP(slit->header.length), 1);
> +     mfn = mfn_x(alloc_boot_pages(PFN_UP(slit->header.length), 1));
>       acpi_slit = mfn_to_virt(mfn);

Same here.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.