2 * Protected Virtualization header
4 * Copyright IBM Corp. 2020
6 * Janosch Frank <frankja@linux.ibm.com>
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
17 #include "hw/s390x/s390-virtio-ccw.h"
19 static inline bool s390_is_pv(void)
21 static S390CcwMachineState
*ccw
;
28 /* we have to bail out for the "none" machine */
29 obj
= object_dynamic_cast(qdev_get_machine(),
30 TYPE_S390_CCW_MACHINE
);
34 ccw
= S390_CCW_MACHINE(obj
);
38 int s390_pv_vm_enable(void);
39 void s390_pv_vm_disable(void);
40 int s390_pv_set_sec_parms(uint64_t origin
, uint64_t length
);
41 int s390_pv_unpack(uint64_t addr
, uint64_t size
, uint64_t tweak
);
42 void s390_pv_prep_reset(void);
43 int s390_pv_verify(void);
44 void s390_pv_unshare(void);
45 void s390_pv_inject_reset_error(CPUState
*cs
);
46 #else /* CONFIG_KVM */
47 static inline bool s390_is_pv(void) { return false; }
48 static inline int s390_pv_vm_enable(void) { return 0; }
49 static inline void s390_pv_vm_disable(void) {}
50 static inline int s390_pv_set_sec_parms(uint64_t origin
, uint64_t length
) { return 0; }
51 static inline int s390_pv_unpack(uint64_t addr
, uint64_t size
, uint64_t tweak
) { return 0; }
52 static inline void s390_pv_prep_reset(void) {}
53 static inline int s390_pv_verify(void) { return 0; }
54 static inline void s390_pv_unshare(void) {}
55 static inline void s390_pv_inject_reset_error(CPUState
*cs
) {};
56 #endif /* CONFIG_KVM */
58 #endif /* HW_S390_PV_H */