On Thu, Mar 15, 2018 at 10:41:56AM -0400, Dave Anderson wrote:
>
> Hi Sergio,
>
> I have one obvious question. Throughout the patch-set you are using
> KDUMP_DUMPFILE() as a qualifier, which is restricted to ELF vmcores
> only. While the use of ELF vmcores is an option, it's far more likely
> that the output format of "virsh dump --memory-only" will utilize one
> of the compressed kdump formats, using zlib, lzo or snappy.
>
> Dave
And aside from support for compressed kdumps, i.e., DISKDUMP_DUMPFILE(),
when I requested segregation of this QEMU-dumps-with-no-VMCOREINFO code,
here's what I meant.
Instead of using KDUMP_DUMPFILE() and/or DISKDUMP_DUMPFILE() as top-level
qualifiers for this patchset, the qualifier should restrict it to only
virsh dump generated dumpfiles that do not have VMCOREINFO notes. Note
that these pc->flags2 bits already exist:
QEMU_MEM_DUMP_ELF
QEMU_MEM_DUMP_COMPRESSED
VMCOREINFO
For this patchset, I suggest creating a new QEMU_MEM_DUMP_NO_VMCOREINFO()
macro that looks something like:
#define QEM_MEM_DUMP_NO_VMCOREINFO() \
((pc->flags2 & (QEMU_MEM_DUMP_ELF|QEMU_MEM_DUMP_COMPRESSED)) &&
!(pc->flags2 & VMCOREINFO))
Then after any "if (QEM_MEM_DUMP_NO_VMCOREINFO()" qualifier applies, you
can use KDUMP_DUMPFILE() or DISKDUMP_DUMPFILE() within that code section to
branch appropriately.
Thanks! I'm going to try this approach and prepare a new versions of the
patchset.
Sergio.