| 1 | /* |
| 2 | * Protected Virtualization header |
| 3 | * |
| 4 | * Copyright IBM Corp. 2020 |
| 5 | * Author(s): |
| 6 | * Janosch Frank <frankja@linux.ibm.com> |
| 7 | * |
| 8 | * This work is licensed under the terms of the GNU GPL, version 2 or (at |
| 9 | * your option) any later version. See the COPYING file in the top-level |
| 10 | * directory. |
| 11 | */ |
| 12 | #ifndef HW_S390_PV_H |
| 13 | #define HW_S390_PV_H |
| 14 | |
| 15 | #include "hw/s390x/s390-virtio-ccw.h" |
| 16 | |
| 17 | struct S390PVResponse { |
| 18 | uint16_t cmd; |
| 19 | uint16_t rrc; |
| 20 | uint16_t rc; |
| 21 | }; |
| 22 | |
| 23 | bool s390_is_pv(void); |
| 24 | int s390_pv_query_info(void); |
| 25 | int s390_pv_vm_enable(void); |
| 26 | void s390_pv_vm_disable(void); |
| 27 | bool s390_pv_vm_try_disable_async(S390CcwMachineState *ms); |
| 28 | int s390_pv_set_sec_parms(uint64_t origin, uint64_t length, |
| 29 | struct S390PVResponse *pv_resp, Error **errp); |
| 30 | int s390_pv_unpack(uint64_t addr, uint64_t size, uint64_t tweak, |
| 31 | struct S390PVResponse *pv_resp); |
| 32 | void s390_pv_prep_reset(void); |
| 33 | int s390_pv_verify(struct S390PVResponse *pv_resp); |
| 34 | void s390_pv_unshare(void); |
| 35 | void s390_pv_inject_reset_error(CPUState *cs, |
| 36 | struct S390PVResponse pv_resp); |
| 37 | uint64_t kvm_s390_pv_dmp_get_size_cpu(void); |
| 38 | uint64_t kvm_s390_pv_dmp_get_size_mem_state(void); |
| 39 | uint64_t kvm_s390_pv_dmp_get_size_completion_data(void); |
| 40 | bool kvm_s390_pv_info_basic_valid(void); |
| 41 | int kvm_s390_dump_init(void); |
| 42 | int kvm_s390_dump_cpu(S390CPU *cpu, void *buff); |
| 43 | int kvm_s390_dump_mem_state(uint64_t addr, size_t len, void *dest); |
| 44 | int kvm_s390_dump_completion_data(void *buff); |
| 45 | |
| 46 | #endif /* HW_S390_PV_H */ |