zdump/dfo_s390: Support s390 DFO for vr-kernel dumps

Since memory chunks can overlap for vr-kernel dumps stored in elf
format (ngdump, zfcpdump), we need to consider this when converting to
s390 dump output format. For that sort DFI memory chunks by start
address and adjust dfo_s390 logic for identifying memory gaps.
Otherwise we might end up with bogus DFO memory chunks being created.

Signed-off-by: Mikhail Zaslonko <zaslonko@linux.ibm.com>
Reviewed-by: Alexander Egorenkov <egorenar@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Mikhail Zaslonko
2024-07-26 10:01:17 +02:00
committed by Jan Höppner
parent 147ff1bf49
commit a95bad6c87
5 changed files with 63 additions and 7 deletions
+16
View File
@@ -324,6 +324,14 @@ void dfi_mem_chunk_read_zero(struct dfi_mem_chunk *UNUSED(mem_chunk),
memset(buf, 0, cnt);
}
/*
* Sort memory chunks by start value
*/
void dfi_mem_chunk_sort(void)
{
util_list_sort(&l.mem_virt.chunk_list, mem_chunk_cmp_fn, NULL);
}
/*
* Return mem_chunk list head
*/
@@ -350,6 +358,14 @@ u64 dfi_mem_range(void)
return l.mem_virt.end_addr - l.mem_virt.start_addr + 1;
}
/*
* Return maximum memory address
*/
u64 dfi_mem_end(void)
{
return l.mem_virt.end_addr;
}
/*
* Is memory range valid?
*/