Add kdump_is_xen() to the API

Use this function to see if the target was running under the Xen
hypervisor.

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
Rename struct kdump_ops to format_ops

This structure defines operations specific to the dump file format,
so the new name is more intuitive.

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
Recognize AArch64 ELF files

This architecture was missing from the ELF mappings.

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
Cleanup: unify arch settings

The new helper (kdump_set_arch) should be always used to set the
target architecture. Note that the live source is an exception to
this rule, because everything is known at compile time.

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
diskdump: Add missing return in read_sub_hdr_32()

Oops. The return value of this function was undefined. :-(

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
diskdump: fix handling of max_mapnr

The use of max_mapnr is broken. It is first used to determine whether
two bitmaps are present (so it must be valid), and then it is reset
to the total number of bits in the bitmap.

If this was used to deal with overflow of the 32-bit counter in the
header, then it is the wrong approach. Instead, such big machines
should always use a version of makedumpfile which stores the full
64-bit value in the subheader.

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>