summaryrefslogtreecommitdiffstats
path: root/include/sysemu
diff options
context:
space:
mode:
authorJanosch Frank2022-10-17 10:38:22 +0200
committerMarc-André Lureau2022-10-26 10:54:59 +0200
commit113d8f4e95cf0450bea421263de6ec016c779ad0 (patch)
treee8765ff222d0cb028300aefe855fca592c520646 /include/sysemu
parents390x: Add KVM PV dump interface (diff)
downloadqemu-113d8f4e95cf0450bea421263de6ec016c779ad0.tar.gz
qemu-113d8f4e95cf0450bea421263de6ec016c779ad0.tar.xz
qemu-113d8f4e95cf0450bea421263de6ec016c779ad0.zip
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>
Diffstat (limited to 'include/sysemu')
-rw-r--r--include/sysemu/dump.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/sysemu/dump.h b/include/sysemu/dump.h
index 38ccac7190..4ffed0b659 100644
--- a/include/sysemu/dump.h
+++ b/include/sysemu/dump.h
@@ -215,4 +215,9 @@ typedef struct DumpState {
uint16_t cpu_to_dump16(DumpState *s, uint16_t val);
uint32_t cpu_to_dump32(DumpState *s, uint32_t val);
uint64_t cpu_to_dump64(DumpState *s, uint64_t val);
+
+int64_t dump_filtered_memblock_size(GuestPhysBlock *block, int64_t filter_area_start,
+ int64_t filter_area_length);
+int64_t dump_filtered_memblock_start(GuestPhysBlock *block, int64_t filter_area_start,
+ int64_t filter_area_length);
#endif