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 v4 1/8] x86: introduce CONFIG_GUEST and move code
Date: Thu, 21 Nov 2019 18:50:42 +0000	[thread overview]
Message-ID: <20191121185049.16666-2-liuwe@microsoft.com> (raw)
In-Reply-To: <20191121185049.16666-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>
Acked-by: Jan Beulich <jbeulich@suse.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 28b3b4692a..867de857e8 100644
--- a/xen/arch/x86/Kconfig
+++ b/xen/arch/x86/Kconfig
@@ -161,8 +161,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 a0b2f4ab15..7da5a2631e 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-11-21 18:51 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-21 18:50 [Xen-devel] [PATCH v4 0/8] Port Xen to Hyper-V Wei Liu
2019-11-21 18:50 ` Wei Liu [this message]
2019-11-21 18:50 ` [Xen-devel] [PATCH v4 2/8] x86: add missing headers in hypercall.h Wei Liu
2019-11-21 18:50 ` [Xen-devel] [PATCH v4 3/8] x86: drop hypervisor_cpuid_base Wei Liu
2019-11-21 18:50 ` [Xen-devel] [PATCH v4 4/8] x86: introduce hypervisor framework Wei Liu
2019-11-22 10:31   ` Durrant, Paul
2019-11-29 13:38     ` Jan Beulich
2019-11-29 13:43   ` Jan Beulich
2019-11-29 18:08   ` Andrew Cooper
2019-11-30 11:48     ` Wei Liu
2019-11-21 18:50 ` [Xen-devel] [PATCH v4 5/8] x86: rename hypervisor_{alloc, free}_unused_page Wei Liu
2019-11-22 10:57   ` Durrant, Paul
2019-11-29 13:39     ` Jan Beulich
2019-11-21 18:50 ` [Xen-devel] [PATCH v4 6/8] x86: switch xen guest implementation to use hypervisor framework Wei Liu
2019-11-22 11:02   ` Durrant, Paul
2019-11-22 11:51     ` Wei Liu
2019-11-29 13:50   ` Jan Beulich
2019-11-30 11:49     ` Wei Liu
2019-11-21 18:50 ` [Xen-devel] [PATCH v4 7/8] x86: be more verbose when running on a hypervisor Wei Liu
2019-11-22 11:04   ` Durrant, Paul
2019-11-29 14:31   ` Jan Beulich
2019-11-29 14:34     ` Jan Beulich
2019-11-29 18:15   ` Andrew Cooper
2019-11-30 11:49     ` Wei Liu
2019-11-21 18:50 ` [Xen-devel] [PATCH v4 8/8] x86: introduce CONFIG_HYPERV and detection code Wei Liu
2019-11-22 11:11   ` Durrant, Paul
2019-11-29 14:35     ` Jan Beulich

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=20191121185049.16666-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.