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

[xen master] libelf: relax ELF_PADDR_OFFSET && !VIRT_BASE check for PVH



commit b77ed96fce9fbc7577d68d563ac72d57bc230cdc
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Wed Feb 22 13:49:26 2023 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Wed Feb 22 13:49:26 2023 +0100

    libelf: relax ELF_PADDR_OFFSET && !VIRT_BASE check for PVH
    
    Both values are unconditionally overridden (to 0) in the "hvm" (i.e.
    PVH) case. There's therefore no reason to punish a PVH kernel for
    setting the former but not the latter.
    
    Fixes: 632cbaf1243e ("libelf: improve PVH elfnote parsing")
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Reviewed-by: Jason Andryuk <jandryuk@xxxxxxxxx>
---
 xen/common/libelf/libelf-dominfo.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/xen/common/libelf/libelf-dominfo.c 
b/xen/common/libelf/libelf-dominfo.c
index 24d1371dd7..e5644f6c7f 100644
--- a/xen/common/libelf/libelf-dominfo.c
+++ b/xen/common/libelf/libelf-dominfo.c
@@ -419,7 +419,8 @@ static elf_errorstatus elf_xen_addr_calc_check(struct 
elf_binary *elf,
     uint64_t virt_offset;
 
     if ( (parms->elf_paddr_offset != UNSET_ADDR) &&
-         (parms->virt_base == UNSET_ADDR) )
+         (parms->virt_base == UNSET_ADDR) &&
+         !hvm )
     {
         elf_err(elf, "ERROR: ELF_PADDR_OFFSET set, VIRT_BASE unset\n");
         return -1;
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

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