0001
0002 #ifndef __LINUX_HYPEVISOR_H
0003 #define __LINUX_HYPEVISOR_H
0004
0005
0006
0007
0008
0009
0010 #ifdef CONFIG_X86
0011
0012 #include <asm/jailhouse_para.h>
0013 #include <asm/x86_init.h>
0014
0015 static inline void hypervisor_pin_vcpu(int cpu)
0016 {
0017 x86_platform.hyper.pin_vcpu(cpu);
0018 }
0019
0020 #else
0021
0022 #include <linux/of.h>
0023
0024 static inline void hypervisor_pin_vcpu(int cpu)
0025 {
0026 }
0027
0028 static inline bool jailhouse_paravirt(void)
0029 {
0030 return of_find_compatible_node(NULL, NULL, "jailhouse,cell");
0031 }
0032
0033 #endif
0034
0035 static inline bool hypervisor_isolated_pci_functions(void)
0036 {
0037 if (IS_ENABLED(CONFIG_S390))
0038 return true;
0039
0040 return jailhouse_paravirt();
0041 }
0042
0043 #endif