mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
Sometimes dumping a virtual machine 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 have introduced Protected Virtualization (PV) dump support - also named confidential dump support. The confidential dump support works by integrating the firmware into the dump process. New Ultravisor calls (UVC) are used to initiate the dump process, dump CPU data, dump memory state and lastly complete the dump process. The guest's data is fully encrypted and can only be decrypted by the entity that owns the customer communication key (CCK) for the dumped guest. The output format is very similar the normal s390 vmcore ELF format, it's only enriched by new sections where the returned data from the UVC "Complete Configuration Dump" and the UVC "Dump Configuration Storage State" is stored. The encrypted CPU data is stored in a new note type `NT_S390_PV_CPU_DATA`. The old note types do still exists but without any confidential data stored. The memory data is stored in the LOAD segment as usual but for PV dumps it's fully AES-XTS encrypted. This commit adds support for reading/decrypting PV guest dumps to zgetdump by introducing a new DFI input module (`dfi_pv_elf.c`). For specifying the customer communication key a new command line option `--key` is added. Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com> Reviewed-by: Steffen Eiden <seiden@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
44 lines
961 B
C
44 lines
961 B
C
/*
|
|
* Copyright IBM Corp. 2001, 2018
|
|
*
|
|
* s390-tools is free software; you can redistribute it and/or modify
|
|
* it under the terms of the MIT license. See LICENSE for details.
|
|
*/
|
|
|
|
#ifndef OPTS_H
|
|
#define OPTS_H
|
|
|
|
#include "zg.h"
|
|
|
|
/*
|
|
* zgetdump options
|
|
*/
|
|
struct options {
|
|
const char *prog_name;
|
|
int action_specified;
|
|
enum zg_action action;
|
|
char *device;
|
|
/* If `output_path == NULL` the output is written to `stdout` */
|
|
const char *output_path;
|
|
const char *key_path;
|
|
char *mount_point;
|
|
int fmt_specified;
|
|
const char *fmt;
|
|
int debug_specified;
|
|
char **argv_fuse;
|
|
int argc_fuse;
|
|
const char *select;
|
|
int select_specified;
|
|
int verbose;
|
|
};
|
|
|
|
extern const char *OPTS_SELECT_KDUMP;
|
|
extern const char *OPTS_SELECT_PROD;
|
|
extern const char *OPTS_SELECT_ALL;
|
|
|
|
void opts_parse(int argc, char *argv[], struct options *opts);
|
|
void opts_print_usage(const char *prog_name);
|
|
void __noreturn print_usage_exit(const char *prog_name);
|
|
|
|
#endif /* OPTS_H */
|