[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH] libelf: Handle PVH kernels lacking ENTRY elfnote
On 19.10.2020 17:26, Jason Andryuk wrote: > 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. And I view things the other way around. If readability is of concern, how about adding an unsigned int flags parameter and #define-ing two suitable constants to be passed? And of course it's not me alone who needs to be okay with whatever route you/we go. Jan
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |