1 /* SPDX-License-Identifier: GPL-2.0-only */
4 * Copyright IBM Corp. 2008
6 * Authors: Hollis Blanchard <hollisb@us.ibm.com>
8 #ifndef __POWERPC_KVM_PARA_H__
9 #define __POWERPC_KVM_PARA_H__
11 #include <uapi/asm/kvm_para.h>
13 #ifdef CONFIG_KVM_GUEST
17 static inline int kvm_para_available(void)
19 struct device_node
*hyper_node
;
21 hyper_node
= of_find_node_by_path("/hypervisor");
25 if (!of_device_is_compatible(hyper_node
, "linux,kvm"))
33 static inline int kvm_para_available(void)
40 static inline unsigned int kvm_arch_para_features(void)
44 if (!kvm_para_available())
47 if(epapr_hypercall0_1(KVM_HCALL_TOKEN(KVM_HC_FEATURES
), &r
))
53 static inline unsigned int kvm_arch_para_hints(void)
58 static inline bool kvm_check_and_clear_guest_paused(void)
63 #endif /* __POWERPC_KVM_PARA_H__ */