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

Re: [Xen-devel] [PATCH v2 4/4] libxc/arm: allocate xenstore and console pages



At 11:55 +0100 on 04 Jul (1341402949), Stefano Stabellini wrote:
>  static int alloc_magic_pages(struct xc_dom_image *dom)
>  {
> +    int rc, i, allocsz;
> +    xen_pfn_t store_pfn, console_pfn, p2m[NR_MAGIC_PAGES];
> +
>      DOMPRINTF_CALLED(dom->xch);
> -    /* XXX
> -     *   dom->p2m_guest
> -     *   dom->start_info_pfn
> -     *   dom->xenstore_pfn
> -     *   dom->console_pfn
> -     */
> +
> +    for (i = 0; i < NR_MAGIC_PAGES; i++)
> +        p2m[i] = dom->rambase_pfn + dom->total_pages + i;
> +
> +    for ( i = rc = allocsz = 0;
> +          (i < NR_MAGIC_PAGES) && !rc;
> +          i += allocsz) {
> +        allocsz = NR_MAGIC_PAGES - i;
> +        rc = xc_domain_populate_physmap_exact(
> +                dom->xch, dom->guest_domid, allocsz,
> +                0, 0, &p2m[i]);
> +    }

What does this loop do?  It seems like it can only ever execute once.

Cheers,

Tim.

_______________________________________________
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®.