All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Liu <wl@xen.org>
To: Xen Development List <xen-devel@lists.xenproject.org>
Cc: "Wei Liu" <liuwe@microsoft.com>, "Wei Liu" <wl@xen.org>,
	"Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Michael Kelley" <mikelley@microsoft.com>,
	"Jan Beulich" <jbeulich@suse.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>
Subject: [Xen-devel] [PATCH for-next v2 1/9] x86: introduce CONFIG_GUEST and move code
Date: Mon, 30 Sep 2019 16:00:35 +0100	[thread overview]
Message-ID: <20190930150044.5734-2-liuwe@microsoft.com> (raw)
In-Reply-To: <20190930150044.5734-1-liuwe@microsoft.com>

Xen is able to run as a guest on Xen. We plan to make it able to run
on Hyper-V as well.

Introduce CONFIG_GUEST which is set to true if either running on Xen
or Hyper-V is desired. Restructure code hierarchy for new code to
come.

No functional change intended.

Signed-off-by: Wei Liu <liuwe@microsoft.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
---
 xen/arch/x86/Kconfig                          | 4 ++++
 xen/arch/x86/Makefile                         | 2 +-
 xen/arch/x86/guest/Makefile                   | 5 +----
 xen/arch/x86/guest/xen/Makefile               | 4 ++++
 xen/arch/x86/guest/{ => xen}/hypercall_page.S | 0
 xen/arch/x86/guest/{ => xen}/pvh-boot.c       | 0
 xen/arch/x86/guest/{ => xen}/xen.c            | 0
 7 files changed, 10 insertions(+), 5 deletions(-)
 create mode 100644 xen/arch/x86/guest/xen/Makefile
 rename xen/arch/x86/guest/{ => xen}/hypercall_page.S (100%)
 rename xen/arch/x86/guest/{ => xen}/pvh-boot.c (100%)
 rename xen/arch/x86/guest/{ => xen}/xen.c (100%)

diff --git a/xen/arch/x86/Kconfig b/xen/arch/x86/Kconfig
index 288dc6c042..584bdc1bb8 100644
--- a/xen/arch/x86/Kconfig
+++ b/xen/arch/x86/Kconfig
@@ -160,8 +160,12 @@ config XEN_ALIGN_2M
 
 endchoice
 
+config GUEST
+	bool
+
 config XEN_GUEST
 	def_bool n
+	select GUEST
 	prompt "Xen Guest"
 	---help---
 	  Support for Xen detecting when it is running under Xen.
diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile
index 2443fd2cc5..99a12d0090 100644
--- a/xen/arch/x86/Makefile
+++ b/xen/arch/x86/Makefile
@@ -1,7 +1,7 @@
 subdir-y += acpi
 subdir-y += cpu
 subdir-y += genapic
-subdir-$(CONFIG_XEN_GUEST) += guest
+subdir-$(CONFIG_GUEST) += guest
 subdir-$(CONFIG_HVM) += hvm
 subdir-y += mm
 subdir-$(CONFIG_XENOPROF) += oprofile
diff --git a/xen/arch/x86/guest/Makefile b/xen/arch/x86/guest/Makefile
index 26fb4b1007..6806f04947 100644
--- a/xen/arch/x86/guest/Makefile
+++ b/xen/arch/x86/guest/Makefile
@@ -1,4 +1 @@
-obj-y += hypercall_page.o
-obj-y += xen.o
-
-obj-bin-$(CONFIG_PVH_GUEST) += pvh-boot.init.o
+subdir-$(CONFIG_XEN_GUEST) += xen
diff --git a/xen/arch/x86/guest/xen/Makefile b/xen/arch/x86/guest/xen/Makefile
new file mode 100644
index 0000000000..26fb4b1007
--- /dev/null
+++ b/xen/arch/x86/guest/xen/Makefile
@@ -0,0 +1,4 @@
+obj-y += hypercall_page.o
+obj-y += xen.o
+
+obj-bin-$(CONFIG_PVH_GUEST) += pvh-boot.init.o
diff --git a/xen/arch/x86/guest/hypercall_page.S b/xen/arch/x86/guest/xen/hypercall_page.S
similarity index 100%
rename from xen/arch/x86/guest/hypercall_page.S
rename to xen/arch/x86/guest/xen/hypercall_page.S
diff --git a/xen/arch/x86/guest/pvh-boot.c b/xen/arch/x86/guest/xen/pvh-boot.c
similarity index 100%
rename from xen/arch/x86/guest/pvh-boot.c
rename to xen/arch/x86/guest/xen/pvh-boot.c
diff --git a/xen/arch/x86/guest/xen.c b/xen/arch/x86/guest/xen/xen.c
similarity index 100%
rename from xen/arch/x86/guest/xen.c
rename to xen/arch/x86/guest/xen/xen.c
-- 
2.20.1


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2019-09-30 15:01 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-30 15:00 [Xen-devel] [PATCH for-next v2 0/9] Port Xen to Hyper-V Wei Liu
2019-09-30 15:00 ` Wei Liu [this message]
2019-09-30 15:00 ` [Xen-devel] [PATCH for-next v2 2/9] x86: include asm_defns.h directly in hypercall.h Wei Liu
2019-09-30 15:00 ` [Xen-devel] [PATCH for-next v2 3/9] x86: drop hypervisor_cpuid_base Wei Liu
2019-09-30 15:00 ` [Xen-devel] [PATCH for-next v2 4/9] x86: include xen/lib.h in guest/hypercall.h Wei Liu
2019-10-21  9:02   ` Roger Pau Monné
2019-09-30 15:00 ` [Xen-devel] [PATCH for-next v2 5/9] x86: introduce hypervisor framework Wei Liu
2019-09-30 15:00 ` [Xen-devel] [PATCH for-next v2 6/9] x86: rename hypervisor_{alloc, free}_unused_page Wei Liu
2019-10-21  9:11   ` Roger Pau Monné
2019-09-30 15:00 ` [Xen-devel] [PATCH for-next v2 7/9] x86: switch xen implementation to use hypervisor framework Wei Liu
2019-10-21  9:56   ` Roger Pau Monné
2019-10-21 14:35     ` Wei Liu
2019-09-30 15:00 ` [Xen-devel] [PATCH for-next v2 8/9] x86: be more verbose when running on a hypervisor Wei Liu
2019-10-21 10:00   ` Roger Pau Monné
2019-10-21 14:35     ` Wei Liu
2019-10-23 13:22     ` Jan Beulich
2019-11-05 11:17       ` Wei Liu
2019-09-30 15:00 ` [Xen-devel] [PATCH for-next v2 9/9] x86: introduce CONFIG_HYPERV and detection code Wei Liu
2019-09-30 15:04   ` Wei Liu
2019-10-21 10:22   ` Roger Pau Monné
2019-10-21 10:26     ` Roger Pau Monné
2019-10-21 15:02       ` Andrew Cooper
2019-10-21 15:26         ` Wei Liu
2019-10-21 14:56     ` Wei Liu
2019-10-21 15:11       ` Roger Pau Monné
2019-10-21 15:20         ` Wei Liu
2019-09-30 15:00 ` [Xen-devel] [PATCH for-next RFC 0/8] Port Xen to Hyper-V Wei Liu
2019-10-21  8:58 ` [Xen-devel] [PATCH for-next v2 0/9] " Wei Liu

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=20190930150044.5734-2-liuwe@microsoft.com \
    --to=wl@xen.org \
    --cc=andrew.cooper3@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=liuwe@microsoft.com \
    --cc=mikelley@microsoft.com \
    --cc=roger.pau@citrix.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.