diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2018-03-07 08:39:12 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2018-03-08 12:30:37 +0100 |
commit | 63338a38db955cb4e0352c11b78732157c78d30b (patch) | |
tree | e8cdd67b1ca569a67cb63908f586bba6caff8336 /include/linux/hypervisor.h | |
parent | 0a5169add90e43ab45ab1ba34223b8583fcaf675 (diff) |
jailhouse: Provide detection for non-x86 systems
Implement jailhouse_paravirt() via device tree probing on architectures
!= x86. Will be used by the PCI core.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Juergen Gross <jgross@suse.com>
Cc: jailhouse-dev@googlegroups.com
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: linux-pci@vger.kernel.org
Cc: virtualization@lists.linux-foundation.org
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Link: https://lkml.kernel.org/r/dae9fe0c6e63141c28ca90492fa5712b4c33ffb5.1520408357.git.jan.kiszka@siemens.com
Diffstat (limited to 'include/linux/hypervisor.h')
-rw-r--r-- | include/linux/hypervisor.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/include/linux/hypervisor.h b/include/linux/hypervisor.h index b19563f9a8eb..fc08b433c856 100644 --- a/include/linux/hypervisor.h +++ b/include/linux/hypervisor.h @@ -8,15 +8,28 @@ */ #ifdef CONFIG_X86 + +#include <asm/jailhouse_para.h> #include <asm/x86_init.h> + static inline void hypervisor_pin_vcpu(int cpu) { x86_platform.hyper.pin_vcpu(cpu); } -#else + +#else /* !CONFIG_X86 */ + +#include <linux/of.h> + static inline void hypervisor_pin_vcpu(int cpu) { } -#endif + +static inline bool jailhouse_paravirt(void) +{ + return of_find_compatible_node(NULL, NULL, "jailhouse,cell"); +} + +#endif /* !CONFIG_X86 */ #endif /* __LINUX_HYPEVISOR_H */ |