From: tip-bot for Jan Kiszka <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, andy.shevchenko@gmail.com,
bhelgaas@google.com, mark.rutland@arm.com,
jan.kiszka@siemens.com, hpa@zytor.com, robh+dt@kernel.org,
tglx@linutronix.de, mingo@kernel.org, jgross@suse.com
Subject: [tip:x86/platform] jailhouse: Provide detection for non-x86 systems
Date: Thu, 8 Mar 2018 03:33:54 -0800 [thread overview]
Message-ID: <tip-63338a38db955cb4e0352c11b78732157c78d30b@git.kernel.org> (raw)
In-Reply-To: <dae9fe0c6e63141c28ca90492fa5712b4c33ffb5.1520408357.git.jan.kiszka@siemens.com>
Commit-ID: 63338a38db955cb4e0352c11b78732157c78d30b
Gitweb: https://git.kernel.org/tip/63338a38db955cb4e0352c11b78732157c78d30b
Author: Jan Kiszka <jan.kiszka@siemens.com>
AuthorDate: Wed, 7 Mar 2018 08:39:12 +0100
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Thu, 8 Mar 2018 12:30:37 +0100
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
---
Documentation/devicetree/bindings/jailhouse.txt | 8 ++++++++
arch/x86/include/asm/jailhouse_para.h | 2 +-
include/linux/hypervisor.h | 17 +++++++++++++++--
3 files changed, 24 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/jailhouse.txt b/Documentation/devicetree/bindings/jailhouse.txt
new file mode 100644
index 000000000000..2901c25ff340
--- /dev/null
+++ b/Documentation/devicetree/bindings/jailhouse.txt
@@ -0,0 +1,8 @@
+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"
diff --git a/arch/x86/include/asm/jailhouse_para.h b/arch/x86/include/asm/jailhouse_para.h
index 875b54376689..b885a961a150 100644
--- a/arch/x86/include/asm/jailhouse_para.h
+++ b/arch/x86/include/asm/jailhouse_para.h
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL2.0 */
/*
- * Jailhouse paravirt_ops implementation
+ * Jailhouse paravirt detection
*
* Copyright (c) Siemens AG, 2015-2017
*
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 */
next prev parent reply other threads:[~2018-03-08 11:34 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-07 7:39 [PATCH v5 0/7] jailhouse: Enhance secondary Jailhouse guest support /wrt PCI Jan Kiszka
2018-03-07 7:39 ` [PATCH v5 1/7] jailhouse: Provide detection for non-x86 systems Jan Kiszka
2018-03-08 11:33 ` tip-bot for Jan Kiszka [this message]
2018-03-07 7:39 ` [PATCH v5 2/7] PCI: Scan all functions when running over Jailhouse Jan Kiszka
2018-03-08 11:34 ` [tip:x86/platform] " tip-bot for Jan Kiszka
2018-03-07 7:39 ` [PATCH v5 3/7] x86/jailhouse: Enable PCI mmconfig access in inmates Jan Kiszka
2018-03-08 11:35 ` [tip:x86/platform] " tip-bot for Otavio Pontes
2018-03-07 7:39 ` [PATCH v5 4/7] x86: Align x86_64 PCI_MMCONFIG with 32-bit variant Jan Kiszka
2018-03-08 11:35 ` [tip:x86/platform] " tip-bot for Jan Kiszka
2018-03-07 7:39 ` [PATCH v5 5/7] x86: Consolidate PCI_MMCONFIG configs Jan Kiszka
2018-03-08 11:36 ` [tip:x86/platform] " tip-bot for Jan Kiszka
2018-03-07 7:39 ` [PATCH v5 6/7] x86/jailhouse: Allow to use PCI_MMCONFIG without ACPI Jan Kiszka
2018-03-08 11:36 ` [tip:x86/platform] " tip-bot for Jan Kiszka
2018-03-07 7:39 ` [PATCH v5 7/7] MAINTAINERS: Add entry for Jailhouse Jan Kiszka
2018-03-08 11:36 ` [tip:x86/platform] " tip-bot for Jan Kiszka
2018-03-19 19:48 ` [PATCH v5 0/7] jailhouse: Enhance secondary Jailhouse guest support /wrt PCI Bjorn Helgaas
2018-03-19 19:50 ` Thomas Gleixner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-63338a38db955cb4e0352c11b78732157c78d30b@git.kernel.org \
--to=tipbot@zytor.com \
--cc=andy.shevchenko@gmail.com \
--cc=bhelgaas@google.com \
--cc=hpa@zytor.com \
--cc=jan.kiszka@siemens.com \
--cc=jgross@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@kernel.org \
--cc=robh+dt@kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox