From: Ian Campbell Subject: Re: [PATCH v3 4/4] libxc/arm: allocate xenstore and console pages Date: Thu, 2 Aug 2012 17:05:12 +0100 Message-ID: <1343923512.27221.168.camel@zakaz.uk.xensource.com> References: <1342795744-3768-1-git-send-email-stefano.stabellini@eu.citrix.com> <1342795744-3768-4-git-send-email-stefano.stabellini@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1342795744-3768-4-git-send-email-stefano.stabellini@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Stefano Stabellini Cc: "xen-devel@lists.xensource.com" , "Tim (Xen.org)" List-Id: xen-devel@lists.xenproject.org On Fri, 2012-07-20 at 15:49 +0100, Stefano Stabellini wrote: > + > + for (i = 0; i < NR_MAGIC_PAGES; i++) > + p2m[i] = dom->rambase_pfn + dom->total_pages + i; > + > + rc = xc_domain_populate_physmap_exact( > + dom->xch, dom->guest_domid, NR_MAGIC_PAGES, > + 0, 0, &p2m[i]); This isn't right -- it should be just "p2m" not "&p2m[i]" -- the latter only made sense when the call was in a loop, now it just means we point off the end of the array. I'll send a patch tomorrow, right now I have to run. > + if ( rc < 0 ) > + return rc; > + > + console_pfn = dom->rambase_pfn + dom->total_pages + CONSOLE_PFN_OFFSET; > + store_pfn = dom->rambase_pfn + dom->total_pages + XENSTORE_PFN_OFFSET; > + > + xc_clear_domain_page(dom->xch, dom->guest_domid, console_pfn); > + xc_clear_domain_page(dom->xch, dom->guest_domid, store_pfn); > + xc_set_hvm_param(dom->xch, dom->guest_domid, HVM_PARAM_CONSOLE_PFN, > + console_pfn); > + xc_set_hvm_param(dom->xch, dom->guest_domid, HVM_PARAM_STORE_PFN, > + store_pfn); > + > return 0; > } >