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

Re: [Xen-devel] [PATCH v4 6/9] tools: arm: prepare domain builder for multiple banks of guest RAM



Hi Ian,

On 05/13/2014 12:29 PM, Ian Campbell wrote:
> +    /* Convenient */
>      const uint64_t kernbase = dom->kernel_seg.vstart;
>      const uint64_t kernend = ROUNDUP(dom->kernel_seg.vend, 21/*2MB*/);
>      const uint64_t kernsize = kernend - kernbase;
> @@ -298,20 +302,32 @@ int arch_setup_meminit(struct xc_dom_image *dom)
>      const uint64_t ramdisk_size = dom->ramdisk_blob ?
>          ROUNDUP(dom->ramdisk_size, XC_PAGE_SHIFT) : 0;
>      const uint64_t modsize = dtb_size + ramdisk_size;
> -    const uint64_t ram128mb = rambase + (128<<20);
> +    const uint64_t ram128mb = GUEST_RAM0_BASE + (128<<20);

I would use bankbase[0] here for more clarity.

[..]

> @@ -321,6 +337,20 @@ int arch_setup_meminit(struct xc_dom_image *dom)
>  
>      dom->shadow_enabled = 1;
>  
> +    for (i = 0; ramsize && i < GUEST_RAM_BANKS; i++)

for ( ... )

[..]

>      /* setup initial p2m and allocate guest memory */
> -    if ((rc = populate_guest_memory(dom,
> -                                    GUEST_RAM_BASE >> XC_PAGE_SHIFT,
> -                                    ramsize >> XC_PAGE_SHIFT)))
> -        return rc;
> +    for (i = 0; rambank_size[i] && i < GUEST_RAM_BANKS; i++)

for ( ... )

Regards,

-- 
Julien Grall

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


 


Rackspace

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