[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH RFC v1 06/74] tools/libelf: fix elf notes check for PVH guest
PVH only requires PHYS32_ENTRY to be set. Return immediately if that's the case. Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> --- xen/common/libelf/libelf-dominfo.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/xen/common/libelf/libelf-dominfo.c b/xen/common/libelf/libelf-dominfo.c index 829d5176a9..508f08db42 100644 --- a/xen/common/libelf/libelf-dominfo.c +++ b/xen/common/libelf/libelf-dominfo.c @@ -381,6 +381,13 @@ static elf_errorstatus elf_xen_note_check(struct elf_binary *elf, return 0; } + /* PVH only requires one ELF note to be set */ + if ( parms->phys_entry != UNSET_ADDR32 ) + { + elf_msg(elf, "ELF: Found PVH image\n"); + return 0; + } + /* Check the contents of the Xen notes or guest string. */ if ( ((strlen(parms->loader) == 0) || strncmp(parms->loader, "generic", 7)) && @@ -389,7 +396,7 @@ static elf_errorstatus elf_xen_note_check(struct elf_binary *elf, { elf_err(elf, "ERROR: Will only load images built for the generic loader or Linux images" - " (Not '%.*s' and '%.*s')\n", + " (Not '%.*s' and '%.*s') or with PHYS32_ENTRY set\n", (int)sizeof(parms->loader), parms->loader, (int)sizeof(parms->guest_os), parms->guest_os); return -1; -- 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |