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
16 #include "hw/s390x/s390-virtio-ccw.h"
18 static inline bool s390_is_pv(void)
20 static S390CcwMachineState
*ccw
;
27 /* we have to bail out for the "none" machine */
28 obj
= object_dynamic_cast(qdev_get_machine(),
29 TYPE_S390_CCW_MACHINE
);
33 ccw
= S390_CCW_MACHINE(obj
);
37 int s390_pv_vm_enable(void);
38 void s390_pv_vm_disable(void);
39 int s390_pv_set_sec_parms(uint64_t origin
, uint64_t length
);
40 int s390_pv_unpack(uint64_t addr
, uint64_t size
, uint64_t tweak
);
41 void s390_pv_perf_clear_reset(void);
42 int s390_pv_verify(void);
43 void s390_pv_unshare(void);
44 #else /* CONFIG_KVM */
45 static inline bool s390_is_pv(void) { return false; }
46 static inline int s390_pv_vm_enable(void) { return 0; }
47 static inline void s390_pv_vm_disable(void) {}
48 static inline int s390_pv_set_sec_parms(uint64_t origin
, uint64_t length
) { return 0; }
49 static inline int s390_pv_unpack(uint64_t addr
, uint64_t size
, uint64_t tweak
) { return 0; }
50 static inline void s390_pv_perf_clear_reset(void) {}
51 static inline int s390_pv_verify(void) { return 0; }
52 static inline void s390_pv_unshare(void) {}
53 #endif /* CONFIG_KVM */
55 #endif /* HW_S390_PV_H */