hypervisor.h 608 B

1234567891011121314151617181920212223242526272829303132333435
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef __LINUX_HYPEVISOR_H
  3. #define __LINUX_HYPEVISOR_H
  4. /*
  5. * Generic Hypervisor support
  6. * Juergen Gross <jgross@suse.com>
  7. */
  8. #ifdef CONFIG_X86
  9. #include <asm/jailhouse_para.h>
  10. #include <asm/x86_init.h>
  11. static inline void hypervisor_pin_vcpu(int cpu)
  12. {
  13. x86_platform.hyper.pin_vcpu(cpu);
  14. }
  15. #else /* !CONFIG_X86 */
  16. #include <linux/of.h>
  17. static inline void hypervisor_pin_vcpu(int cpu)
  18. {
  19. }
  20. static inline bool jailhouse_paravirt(void)
  21. {
  22. return of_find_compatible_node(NULL, NULL, "jailhouse,cell");
  23. }
  24. #endif /* !CONFIG_X86 */
  25. #endif /* __LINUX_HYPEVISOR_H */