From: Wei Liu Subject: Re: [PATCH v8 05/32] libxc: introduce a domain loader for HVM guest firmware Date: Thu, 8 Oct 2015 12:13:14 +0100 Message-ID: <20151008111314.GE30852@zion.uk.xensource.com> References: <1443800943-17668-6-git-send-email-roger.pau@citrix.com> <1444236938-25485-1-git-send-email-roger.pau@citrix.com> <1444299145.1410.137.camel@citrix.com> <561648DF.8020201@citrix.com> <1444302270.1410.151.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Zk98Y-0001Wq-VH for xen-devel@lists.xenproject.org; Thu, 08 Oct 2015 11:13:27 +0000 Content-Disposition: inline In-Reply-To: <1444302270.1410.151.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: Wei Liu , Stefano Stabellini , Andrew Cooper , Ian Jackson , xen-devel@lists.xenproject.org, Roger Pau =?iso-8859-1?Q?Monn=E9?= List-Id: xen-devel@lists.xenproject.org On Thu, Oct 08, 2015 at 12:04:30PM +0100, Ian Campbell wrote: > On Thu, 2015-10-08 at 12:43 +0200, Roger Pau Monn=E9 wrote: > > > However I'm unsure that the presence or absence of ELF notes is suffi= cient, > > > since there is at least the legacy SHT_NOTE section and then __xen_gu= est > > > section (see the tail of elf_xen_parse) as well. > > = > > AFAICT NetBSD still uses the __xen_guest section, and it works fine with > > this change: > > = > > http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/arch/amd64/amd64= /locore.S?rev=3D1.78&content-type=3Dtext/plain&only_with_tag=3DMAIN > > = > > elfloader recognizes the kernel and it's able to load it without issues. > > = > > xc_dom_parse_elf_kernel already calls elf_xen_parse later on, while > > trying to load the kernel, so the functionality it's exactly the same, > > it's just that we now simply refuse to try to load a kernel without > > elfnotes with elfloader. > > = > > Without this change the elfloader would try to load a kernel without > > elfnotes just to fail later while parsing it. > = > Great, thanks for confirming. > = > > > It's a bit of a shame to now have to parse the ELF twice. How abusive= would > > > to be to declare that when a xc_dom ->probe hook returns success it is > > > entitled to rely on the contents of dom->loader_private being preserv= ed > > > until ->parse is called. In turn this would imply that the first succ= essful > > > probe would be used rather than e.g. probing everything and then pick= ing a > > > winner from the successful applicants. > > = > > We already do this, we stop testing once a probe returns 0 (see > > xc_dom_find_loader), and use that as the loader, so there's no > > functional change in this aspect. IMHO, this approach is not very > > intrusive, would you like me implement it in a followup patch or rather > > do it in the series? > = > I think this series is big enough that we need to start draining the > pipeline. So lets address this later. > = > On the basis that v7 was Reviewed by Andy and Acked by Wei and that I've > looked at the delta (only) from that: > = > Acked-by: Ian Campbell > = v8 Acked-by: Wei Liu