Blame view

include/linux/hypervisor.h 608 Bytes
b24413180   Greg Kroah-Hartman   License cleanup: ...
1
  /* SPDX-License-Identifier: GPL-2.0 */
47ae4b05d   Juergen Gross   virt, sched: Add ...
2
3
4
5
6
7
8
  #ifndef __LINUX_HYPEVISOR_H
  #define __LINUX_HYPEVISOR_H
  
  /*
   *	Generic Hypervisor support
   *		Juergen Gross <jgross@suse.com>
   */
f72e38e8e   Juergen Gross   x86/virt, x86/pla...
9
  #ifdef CONFIG_X86
63338a38d   Jan Kiszka   jailhouse: Provid...
10
11
  
  #include <asm/jailhouse_para.h>
f72e38e8e   Juergen Gross   x86/virt, x86/pla...
12
  #include <asm/x86_init.h>
63338a38d   Jan Kiszka   jailhouse: Provid...
13

f72e38e8e   Juergen Gross   x86/virt, x86/pla...
14
15
16
17
  static inline void hypervisor_pin_vcpu(int cpu)
  {
  	x86_platform.hyper.pin_vcpu(cpu);
  }
63338a38d   Jan Kiszka   jailhouse: Provid...
18
19
20
21
  
  #else /* !CONFIG_X86 */
  
  #include <linux/of.h>
47ae4b05d   Juergen Gross   virt, sched: Add ...
22
23
24
  static inline void hypervisor_pin_vcpu(int cpu)
  {
  }
63338a38d   Jan Kiszka   jailhouse: Provid...
25
26
27
28
29
30
31
  
  static inline bool jailhouse_paravirt(void)
  {
  	return of_find_compatible_node(NULL, NULL, "jailhouse,cell");
  }
  
  #endif /* !CONFIG_X86 */
47ae4b05d   Juergen Gross   virt, sched: Add ...
32
33
  
  #endif /* __LINUX_HYPEVISOR_H */