0001
0002
0003
0004
0005
0006
0007
0008 #ifndef __POWERPC_KVM_PARA_H__
0009 #define __POWERPC_KVM_PARA_H__
0010
0011 #include <asm/kvm_guest.h>
0012
0013 #include <uapi/asm/kvm_para.h>
0014
0015 static inline int kvm_para_available(void)
0016 {
0017 return IS_ENABLED(CONFIG_KVM_GUEST) && is_kvm_guest();
0018 }
0019
0020 static inline unsigned int kvm_arch_para_features(void)
0021 {
0022 unsigned long r;
0023
0024 if (!kvm_para_available())
0025 return 0;
0026
0027 if(epapr_hypercall0_1(KVM_HCALL_TOKEN(KVM_HC_FEATURES), &r))
0028 return 0;
0029
0030 return r;
0031 }
0032
0033 static inline unsigned int kvm_arch_para_hints(void)
0034 {
0035 return 0;
0036 }
0037
0038 static inline bool kvm_check_and_clear_guest_paused(void)
0039 {
0040 return false;
0041 }
0042
0043 #endif