summaryrefslogtreecommitdiffstats
path: root/dump/dump.c
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 /dump/dump.c
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 'dump/dump.c')
-rw-r--r--dump/dump.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/dump/dump.c b/dump/dump.c
index 9428d1fde9..df117c847f 100644
--- a/dump/dump.c
+++ b/dump/dump.c
@@ -708,9 +708,9 @@ static void dump_begin(DumpState *s, Error **errp)
write_elf_notes(s, errp);
}
-static int64_t dump_filtered_memblock_size(GuestPhysBlock *block,
- int64_t filter_area_start,
- int64_t filter_area_length)
+int64_t dump_filtered_memblock_size(GuestPhysBlock *block,
+ int64_t filter_area_start,
+ int64_t filter_area_length)
{
int64_t size, left, right;
@@ -728,9 +728,9 @@ static int64_t dump_filtered_memblock_size(GuestPhysBlock *block,
return size;
}
-static int64_t dump_filtered_memblock_start(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)
{
if (filter_area_length) {
/* return -1 if the block is not within filter area */