mbox series

[0/5] s390x: dump: Add PV dump support

Message ID 20220310112547.3823-1-frankja@linux.ibm.com (mailing list archive)
Headers show
Series s390x: dump: Add PV dump support | expand

Message

Janosch Frank March 10, 2022, 11:25 a.m. UTC
This is the qemu part of the PV dump support where we take the data
that the KVM PV dump API gives us and put it into the ELF file for
later processing.

The encrypted PV cpu state is added as an additional note like the
other architecture registers.

The storage state and completion data however are put into their own
sections. The storage state data provides one part of the puzzle
needed to decrypt the memory and the completion data contains the
other part as well as a key derivation seed for the encrypted cpu data.

Based on:
https://lore.kernel.org/qemu-devel/20220310110854.2701-1-frankja@linux.ibm.com/T/#t
https://lore.kernel.org/qemu-devel/20220310111608.3362-2-frankja@linux.ibm.com/T/#t

Personal notes:
I still need to improve error management which will mean that the
ioctl functions in hw/s390x/pv.c will need to be changed to return the
rc/rrc.

Janosch Frank (5):
  linux header sync
  s390x: Add protected dump cap
  s390x: Introduce PV query interface
  s390x: Add KVM PV dump interface
  s390x: pv: Add dump support

 dump/dump.c                  |  27 ----
 hw/s390x/pv.c                | 113 ++++++++++++++++
 hw/s390x/s390-virtio-ccw.c   |   5 +
 include/elf.h                |   1 +
 include/hw/s390x/pv.h        |  18 +++
 include/sysemu/dump.h        |  27 ++++
 linux-headers/linux/kvm.h    |  55 ++++++++
 target/s390x/arch_dump.c     | 247 ++++++++++++++++++++++++++++++-----
 target/s390x/kvm/kvm.c       |   7 +
 target/s390x/kvm/kvm_s390x.h |   1 +
 10 files changed, 443 insertions(+), 58 deletions(-)