From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Liu Subject: Re: pvgrub "Error 9: Unknown boot failure" booting Debian Jessie kernel (Was: Re: [PATCH v5 6/9] libxc: create unmapped initrd in domain builder if supported) Date: Tue, 1 Dec 2015 10:21:20 +0000 Message-ID: <20151201102120.GM21588@citrix.com> References: <1448890911.15768.39.camel@citrix.com> <565C7631.4000505@suse.com> <1448900736.15768.50.camel@citrix.com> <1448902580.15768.54.camel@citrix.com> <565D4929.1090008@suse.com> <565D4F16.90800@suse.com> <1448958652.13926.71.camel@citrix.com> <565D6005.3030809@suse.com> <1448964104.15768.71.camel@citrix.com> <1448964278.15768.72.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline In-Reply-To: <1448964278.15768.72.camel@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: Ian Campbell Cc: Juergen Gross , Wei Liu , stefano.stabellini@eu.citrix.com, ian.jackson@eu.citrix.com, xen-devel@lists.xen.org, Boris Ostrovsky , roger.pau@citrix.com List-Id: xen-devel@lists.xenproject.org On Tue, Dec 01, 2015 at 10:04:38AM +0000, Ian Campbell wrote: > On Tue, 2015-12-01 at 10:01 +0000, Ian Campbell wrote: > > = > > > > I'll try that and your suggested patch below as well once I get to = the > > > > office this morning. > > > = > > > Thanks. > > = > > The BUG_ON doesn't seem to be triggering. I'm not seeing pfn=3D=3D0x4d8= 0 going > > anywhere near kexec_allocate, the highest is=A00x4c0f. > > = > > Maybe the issue is that the ->allocate hook (=3D=3Dkexec_allocate) isn'= t called > > from xc_dom_alloc_pad? > = > That seems like it might be the answer, this patchlet fixes it for me: > = > diff --git a/tools/libxc/xc_dom_core.c b/tools/libxc/xc_dom_core.c > index 5d6c3ba..6d3f97a 100644 > --- a/tools/libxc/xc_dom_core.c > +++ b/tools/libxc/xc_dom_core.c > @@ -579,7 +579,13 @@ static int xc_dom_alloc_pad(struct xc_dom_image *dom= , xen_vaddr_t boundary) > =A0=A0=A0=A0=A0} > =A0=A0=A0=A0=A0pages =3D (boundary - dom->virt_alloc_end) / page_size; > =A0 > -=A0=A0=A0=A0return xc_dom_chk_alloc_pages(dom, "padding", pages); > +=A0=A0=A0=A0if ( xc_dom_chk_alloc_pages(dom, "padding", pages) ) > +=A0=A0=A0=A0=A0=A0=A0=A0return -1; > + > +=A0=A0=A0=A0if (dom->allocate) > +=A0=A0=A0=A0=A0=A0=A0=A0dom->allocate(dom); > + > +=A0=A0=A0=A0return 0; > =A0} > =A0 > =A0int xc_dom_alloc_segment(struct xc_dom_image *dom, Currently there are three places that call dom->allocate (if we include the call in the proposed diff). I think it would be better if we push dom->allocate down to xc_dom_chk_alloc_pages, then refactor xc_dom_alloc_page to use xc_dom_chk_alloc_pages. Just some thought after a quick look at the code. I will see what I can do after confirming this is the culprit. Wei.