]> git.proxmox.com Git - mirror_qemu.git/commit
s390x: pv: Add dump support
authorJanosch Frank <frankja@linux.ibm.com>
Mon, 17 Oct 2022 08:38:22 +0000 (08:38 +0000)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Wed, 26 Oct 2022 08:54:59 +0000 (12:54 +0400)
commit113d8f4e95cf0450bea421263de6ec016c779ad0
treee8765ff222d0cb028300aefe855fca592c520646
parent753ca06f4706cd6e57750a606afb08c5c5299643
s390x: pv: Add dump support

Sometimes dumping a guest from the outside is the only way to get the
data that is needed. This can be the case if a dumping mechanism like
KDUMP hasn't been configured or data needs to be fetched at a specific
point. Dumping a protected guest from the outside without help from
fw/hw doesn't yield sufficient data to be useful. Hence we now
introduce PV dump support.

The PV dump support works by integrating the firmware into the dump
process. New Ultravisor calls are used to initiate the dump process,
dump cpu data, dump memory state and lastly complete the dump process.
The UV calls are exposed by KVM via the new KVM_PV_DUMP command and
its subcommands. The guest's data is fully encrypted and can only be
decrypted by the entity that owns the customer communication key for
the dumped guest. Also dumping needs to be allowed via a flag in the
SE header.

On the QEMU side of things we store the PV dump data in the newly
introduced architecture ELF sections (storage state and completion
data) and the cpu notes (for cpu dump data).

Users can use the zgetdump tool to convert the encrypted QEMU dump to an
unencrypted one.

Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Reviewed-by: Steffen Eiden <seiden@linux.ibm.com>
Message-Id: <20221017083822.43118-11-frankja@linux.ibm.com>
dump/dump.c
include/sysemu/dump.h
target/s390x/arch_dump.c