[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen stable-4.10] tools/libelf: fix elf notes check for PVH guest
commit 4621c10f489de827742f95c31ac0f43fc3bcde88 Author: Wei Liu <wei.liu2@xxxxxxxxxx> AuthorDate: Thu Jan 11 17:47:58 2018 +0000 Commit: Roger Pau Monne <roger.pau@xxxxxxxxxx> CommitDate: Thu Jan 11 17:51:17 2018 +0000 tools/libelf: fix elf notes check for PVH guest PVH only requires PHYS32_ENTRY to be set. Return immediately if that's the case. Also remove the printk in pvh_load_kernel. Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> --- xen/arch/x86/hvm/dom0_build.c | 4 ---- xen/common/libelf/libelf-dominfo.c | 9 ++++++++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/xen/arch/x86/hvm/dom0_build.c b/xen/arch/x86/hvm/dom0_build.c index a67071c739..303ae4e7b5 100644 --- a/xen/arch/x86/hvm/dom0_build.c +++ b/xen/arch/x86/hvm/dom0_build.c @@ -484,10 +484,6 @@ static int __init pvh_load_kernel(struct domain *d, const module_t *image, return -EINVAL; } - printk("OS: %s version: %s loader: %s bitness: %s\n", parms.guest_os, - parms.guest_ver, parms.loader, - elf_64bit(&elf) ? "64-bit" : "32-bit"); - /* Copy the OS image and free temporary buffer. */ elf.dest_base = (void *)(parms.virt_kstart - parms.virt_base); elf.dest_size = parms.virt_kend - parms.virt_kstart; diff --git a/xen/common/libelf/libelf-dominfo.c b/xen/common/libelf/libelf-dominfo.c index a52900c00c..378bc05f39 100644 --- a/xen/common/libelf/libelf-dominfo.c +++ b/xen/common/libelf/libelf-dominfo.c @@ -373,6 +373,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)) && @@ -381,7 +388,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; -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.10 _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |