xen/pvh: Create a new file for Xen specific PVH code
authorMaran Wilson <maran.wilson@oracle.com>
Mon, 10 Dec 2018 19:08:44 +0000 (11:08 -0800)
committerBoris Ostrovsky <boris.ostrovsky@oracle.com>
Thu, 13 Dec 2018 18:41:49 +0000 (13:41 -0500)
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@oracle.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
arch/x86/platform/pvh/enlighten.c
arch/x86/xen/Makefile
arch/x86/xen/enlighten_pvh.c [new file with mode: 0644]

index 02e3ab7..4919329 100644 (file)
 /*
  * 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")));
 
index b239922..084de77 100644 (file)
@@ -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 (file)
index 0000000..6be7bc7
--- /dev/null
@@ -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;