[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1544076330-21992-1-git-send-email-maran.wilson@oracle.com>
Date: Wed, 5 Dec 2018 22:05:28 -0800
From: Maran Wilson <maran.wilson@...cle.com>
To: x86@...nel.org, xen-devel@...ts.xenproject.org,
linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
pbonzini@...hat.com, jgross@...e.com
Cc: boris.ostrovsky@...cle.com, tglx@...utronix.de, mingo@...hat.com,
hpa@...or.com, roger.pau@...rix.com, rkrcmar@...hat.com,
maran.wilson@...cle.com
Subject: [PATCH v8 3/7] xen/pvh: Create a new file for Xen specific PVH code
We need to refactor PVH entry code so that support for other hypervisors
like Qemu/KVM can be added more easily.
The first step in that direction is to create a new file that will
eventually hold the Xen specific routines.
Signed-off-by: Maran Wilson <maran.wilson@...cle.com>
Reviewed-by: Juergen Gross <jgross@...e.com>
---
arch/x86/platform/pvh/enlighten.c | 5 ++---
arch/x86/xen/Makefile | 2 ++
arch/x86/xen/enlighten_pvh.c | 10 ++++++++++
3 files changed, 14 insertions(+), 3 deletions(-)
create mode 100644 arch/x86/xen/enlighten_pvh.c
diff --git a/arch/x86/platform/pvh/enlighten.c b/arch/x86/platform/pvh/enlighten.c
index 02e3ab7ff242..491932991202 100644
--- a/arch/x86/platform/pvh/enlighten.c
+++ b/arch/x86/platform/pvh/enlighten.c
@@ -18,10 +18,9 @@
/*
* PVH variables.
*
- * xen_pvh pvh_bootparams and pvh_start_info need to live in data segment
- * since they are used after startup_{32|64}, which clear .bss, are invoked.
+ * pvh_bootparams and pvh_start_info need to live in the data segment since
+ * they are used after startup_{32|64}, which clear .bss, are invoked.
*/
-bool xen_pvh __attribute__((section(".data"))) = 0;
struct boot_params pvh_bootparams __attribute__((section(".data")));
struct hvm_start_info pvh_start_info __attribute__((section(".data")));
diff --git a/arch/x86/xen/Makefile b/arch/x86/xen/Makefile
index b239922f6c6c..084de77a109e 100644
--- a/arch/x86/xen/Makefile
+++ b/arch/x86/xen/Makefile
@@ -36,6 +36,8 @@ obj-$(CONFIG_XEN_PV) += multicalls.o
obj-$(CONFIG_XEN_PV) += xen-asm.o
obj-$(CONFIG_XEN_PV) += xen-asm_$(BITS).o
+obj-$(CONFIG_XEN_PVH) += enlighten_pvh.o
+
obj-$(CONFIG_EVENT_TRACING) += trace.o
obj-$(CONFIG_SMP) += smp.o
diff --git a/arch/x86/xen/enlighten_pvh.c b/arch/x86/xen/enlighten_pvh.c
new file mode 100644
index 000000000000..6be7bc719b38
--- /dev/null
+++ b/arch/x86/xen/enlighten_pvh.c
@@ -0,0 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0
+#include <linux/types.h>
+
+/*
+ * PVH variables.
+ *
+ * The variable xen_pvh needs to live in the data segment since it is used
+ * after startup_{32|64} is invoked, which will clear the .bss segment.
+ */
+bool xen_pvh __attribute__((section(".data"))) = 0;
--
2.16.1
Powered by blists - more mailing lists