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

Re: [PATCH] libelf: Handle PVH kernels lacking ENTRY elfnote

On Mon, Oct 19, 2020 at 3:38 AM Jan Beulich <jbeulich@xxxxxxxx> wrote:
> On 16.10.2020 18:28, Jason Andryuk wrote:
> > Looks like we can pass XC_DOM_PV_CONTAINER/XC_DOM_HVM_CONTAINER down
> > into elf_xen_parse().  Then we would just validate phys_entry for HVM
> > and virt_entry for PV.  Does that sound reasonable?
> I think so, yes. Assuming of course that you'll convert the XC_DOM_*
> into a boolean, so that the hypervisor's use of libelf/ can also be
> suitably adjusted.

Are you okay with:
-int elf_xen_parse(struct elf_binary *elf,
-                  struct elf_dom_parms *parms);
+int elf_xen_parse_pvh(struct elf_binary *elf,
+                      struct elf_dom_parms *parms);
+int elf_xen_parse_pv(struct elf_binary *elf,
+                     struct elf_dom_parms *parms);

I prefer avoiding boolean arguments since I find it helps readability.
The xen dom0 builders can just call their variant, but the xenguest
elfloader and hvmloader call the appropriate one based on the




Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.