Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 63338a38 authored by Jan Kiszka's avatar Jan Kiszka Committed by Thomas Gleixner
Browse files

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: default avatarJan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Reviewed-by: default avatarJuergen 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
parent 0a5169ad
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
Jailhouse non-root cell device tree bindings
--------------------------------------------

When running in a non-root Jailhouse cell (partition), the device tree of this
platform shall have a top-level "hypervisor" node with the following
properties:

- compatible = "jailhouse,cell"
+1 −1
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL2.0 */

/*
 * Jailhouse paravirt_ops implementation
 * Jailhouse paravirt detection
 *
 * Copyright (c) Siemens AG, 2015-2017
 *
+15 −2
Original line number Diff line number Diff line
@@ -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 */