From: Maran Wilson <maran.wilson@oracle.com>
To: x86@kernel.org, xen-devel@lists.xenproject.org,
linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
pbonzini@redhat.com, jgross@suse.com
Cc: boris.ostrovsky@oracle.com, tglx@linutronix.de, mingo@redhat.com,
hpa@zytor.com, roger.pau@citrix.com, rkrcmar@redhat.com,
maran.wilson@oracle.com
Subject: [PATCH v8 3/7] xen/pvh: Create a new file for Xen specific PVH code
Date: Wed, 5 Dec 2018 22:05:28 -0800 [thread overview]
Message-ID: <1544076330-21992-1-git-send-email-maran.wilson@oracle.com> (raw)
In-Reply-To: <1544076152-21637-1-git-send-email-maran.wilson@oracle.com>
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>
---
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
next prev parent reply other threads:[~2018-12-06 6:06 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-06 6:02 [PATCH v8 0/7] KVM: x86: Allow Qemu/KVM to use PVH entry point Maran Wilson
2018-12-06 6:04 ` [PATCH v8 1/7] xen/pvh: Split CONFIG_XEN_PVH into CONFIG_PVH and CONFIG_XEN_PVH Maran Wilson
2018-12-06 22:11 ` Paolo Bonzini
2018-12-06 22:34 ` Boris Ostrovsky
2018-12-06 22:49 ` Paolo Bonzini
2018-12-06 23:11 ` Boris Ostrovsky
2018-12-06 23:30 ` Paolo Bonzini
2018-12-06 23:36 ` [Xen-devel] " Andrew Cooper
2018-12-07 6:02 ` Juergen Gross
2018-12-07 13:41 ` Paolo Bonzini
2018-12-07 13:50 ` Juergen Gross
2018-12-07 13:52 ` Paolo Bonzini
2018-12-07 13:58 ` Juergen Gross
2018-12-07 15:14 ` Paolo Bonzini
2018-12-07 18:21 ` Maran Wilson
2018-12-06 6:04 ` [PATCH v8 2/7] xen/pvh: Move PVH entry code out of Xen specific tree Maran Wilson
2018-12-06 6:05 ` Maran Wilson [this message]
2018-12-06 6:05 ` [PATCH v8 4/7] xen/pvh: Move Xen specific PVH VM initialization out of common file Maran Wilson
2018-12-06 6:05 ` [PATCH v8 5/7] xen/pvh: Move Xen code for getting mem map via hcall " Maran Wilson
2018-12-06 6:06 ` [PATCH v8 6/7] xen/pvh: Add memory map pointer to hvm_start_info struct Maran Wilson
2018-12-06 6:06 ` [PATCH v8 7/7] KVM: x86: Allow Qemu/KVM to use PVH entry point Maran Wilson
2018-12-06 22:05 ` Paolo Bonzini
2018-12-06 21:21 ` [PATCH v8 0/7] " Paolo Bonzini
2018-12-06 21:37 ` Borislav Petkov
2018-12-06 21:58 ` Boris Ostrovsky
2018-12-06 22:14 ` Paolo Bonzini
2018-12-07 10:25 ` Borislav Petkov
2018-12-07 16:07 ` [Xen-devel] " Boris Ostrovsky
2018-12-07 19:22 ` Borislav Petkov
2018-12-12 18:09 ` Maran Wilson
2018-12-12 18:17 ` Boris Ostrovsky
2018-12-13 13:13 ` Paolo Bonzini
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=1544076330-21992-1-git-send-email-maran.wilson@oracle.com \
--to=maran.wilson@oracle.com \
--cc=boris.ostrovsky@oracle.com \
--cc=hpa@zytor.com \
--cc=jgross@suse.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=rkrcmar@redhat.com \
--cc=roger.pau@citrix.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/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;
as well as URLs for NNTP newsgroup(s).