qemu: Allow showing the dump progress for memory only dump
qemu: Allow showing the dump progress for memory only dump

https://bugzilla.redhat.com/show_bug.cgi?id=916061

If the QEMU version running is new enough (based on the DUMP_COMPLETED
event), then we can add a 'detach' boolean to the dump-guest-memory
command in order to tell QEMU to run in a thread. This ensures that we
don't lock out other commands while the potentially long running dump
memory is completed.

This allows the usage of a qemuDumpWaitForCompletion which will wait
for the event while the qemuDomainGetJobInfoDumpStats can be used via
qemuDomainGetJobInfo in order to query QEMU to determine how far along
the job is.

Now that we have a true async job, we'll only set the dump_memory_only
flag only when @detach=false; otherwise, we note that the job is a
for stats dump this allows the opposite end for job info to determine
what to copy.

Reviewed-by: Jiri Denemark <62bdf77dc47919a4d59a91822129d14633cfca81@redhat.com>

jardasgit/libvirt,jardasgit/libvirt,eskultety/libvirt,andreabolognani/libvirt,jfehlig/libvirt,nertpinx/libvirt,libvirt/libvirt,fabianfreyer/libvirt,crobinso/libvirt,zippy2/libvirt,zippy2/libvirt,olafhering/libvirt,zippy2/libvirt,eskultety/libvirt,libvirt/libvirt,libvirt/libvirt,jardasgit/libvirt,fabianfreyer/libvirt,fabianfreyer/libvirt,eskultety/libvirt,andreabolognani/libvirt,nertpinx/libvirt,nertpinx/libvirt,crobinso/libvirt,andreabolognani/libvirt,jfehlig/libvirt,nertpinx/libvirt,fabianfreyer/libvirt,libvirt/libvirt,nertpinx/libvirt,eskultety/libvirt,andreabolognani/libvirt,jardasgit/libvirt,jardasgit/libvirt,jfehlig/libvirt,olafhering/libvirt,crobinso/libvirt,zippy2/libvirt,fabianfreyer/libvirt,crobinso/libvirt,jfehlig/libvirt,olafhering/libvirt,olafhering/libvirt,eskultety/libvirt,andreabolognani/libvirt