All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
To: Tim Deegan <tim@xen.org>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	Ian Campbell <Ian.Campbell@citrix.com>,
	Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>
Subject: Re: [PATCH v2 4/4] libxc/arm: allocate xenstore and console pages
Date: Fri, 13 Jul 2012 16:32:52 +0100	[thread overview]
Message-ID: <alpine.DEB.2.02.1207131628350.23783@kaball.uk.xensource.com> (raw)
In-Reply-To: <20120712114626.GD89265@ocelot.phlegethon.org>

On Thu, 12 Jul 2012, Tim Deegan wrote:
> 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.

I think that you are right.
In that case also the same loop in arch_setup_meminit in Ian's patch
should probably be removed:

http://marc.info/?l=xen-devel&m=134089793916569

  reply	other threads:[~2012-07-13 15:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-04 10:55 [PATCH v2 0/4] xen/arm: dom1 PV console up and running Stefano Stabellini
2012-07-04 10:55 ` [PATCH v2 1/4] xen/arm: implement do_hvm_op for ARM Stefano Stabellini
2012-07-12 11:43   ` Tim Deegan
2012-07-04 10:55 ` [PATCH v2 2/4] xen/arm: gic and vgic fixes Stefano Stabellini
2012-07-12 11:43   ` Tim Deegan
2012-07-04 10:55 ` [PATCH v2 3/4] xen/arm: disable the event optimization in the gic Stefano Stabellini
2012-07-04 10:55 ` [PATCH v2 4/4] libxc/arm: allocate xenstore and console pages Stefano Stabellini
2012-07-12 11:46   ` Tim Deegan
2012-07-13 15:32     ` Stefano Stabellini [this message]
2012-07-13 17:02       ` Ian Campbell
2012-07-13 17:15         ` Stefano Stabellini
2012-07-17 16:34 ` [PATCH v2 0/4] xen/arm: dom1 PV console up and running Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.02.1207131628350.23783@kaball.uk.xensource.com \
    --to=stefano.stabellini@eu.citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.