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: 632cbaf124 ("libelf: improve PVH elfnote parsing")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Jason Andryuk <jandryuk@gmail.com>
This commit is contained in:
Jan Beulich committed 2023-02-22 13:49:26 +01:00
1 parent 43ae13269e
commit b77ed96fce
1 file changed
+2 -1
+2 -1
View File
@@ -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;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.