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 RFC 4/8] x86: factor out xen variants for hypervisor setup code
Date: Mon, 23 Sep 2019 11:09:27 +0100	[thread overview]
Message-ID: <20190923100931.29670-5-liuwe@microsoft.com> (raw)
In-Reply-To: <20190923100931.29670-1-liuwe@microsoft.com>

We will add Hyper-V specific implementations in the future.

No functional change.

Signed-off-by: Wei Liu <liuwe@microsoft.com>
---
 xen/arch/x86/guest/xen/xen.c | 32 ++++++++++++++++++++++++++------
 1 file changed, 26 insertions(+), 6 deletions(-)

diff --git a/xen/arch/x86/guest/xen/xen.c b/xen/arch/x86/guest/xen/xen.c
index 78fc603996..f93c8fbd1c 100644
--- a/xen/arch/x86/guest/xen/xen.c
+++ b/xen/arch/x86/guest/xen/xen.c
@@ -67,7 +67,7 @@ static void __init find_xen_leaves(void)
     }
 }
 
-void __init probe_hypervisor(void)
+static void __init probe_xen(void)
 {
     if ( xen_guest )
         return;
@@ -87,6 +87,11 @@ void __init probe_hypervisor(void)
     xen_guest = true;
 }
 
+void __init probe_hypervisor(void)
+{
+    probe_xen();
+}
+
 static void map_shared_info(void)
 {
     mfn_t mfn;
@@ -249,10 +254,8 @@ static void init_evtchn(void)
     }
 }
 
-void __init hypervisor_setup(void)
+static void __init xen_setup(void)
 {
-    init_memmap();
-
     map_shared_info();
 
     set_vcpu_id();
@@ -277,13 +280,25 @@ void __init hypervisor_setup(void)
     init_evtchn();
 }
 
-void hypervisor_ap_setup(void)
+void __init hypervisor_setup(void)
+{
+    init_memmap();
+
+    xen_setup();
+}
+
+static void xen_ap_setup(void)
 {
     set_vcpu_id();
     map_vcpuinfo();
     init_evtchn();
 }
 
+void hypervisor_ap_setup(void)
+{
+    xen_ap_setup();
+}
+
 int hypervisor_alloc_unused_page(mfn_t *mfn)
 {
     unsigned long m;
@@ -307,7 +322,7 @@ static void ap_resume(void *unused)
     init_evtchn();
 }
 
-void hypervisor_resume(void)
+static void xen_resume(void)
 {
     /* Reset shared info page. */
     map_shared_info();
@@ -330,6 +345,11 @@ void hypervisor_resume(void)
         pv_console_init();
 }
 
+void hypervisor_resume(void)
+{
+    xen_resume();
+}
+
 /*
  * Local variables:
  * mode: C
-- 
2.20.1


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

  parent reply	other threads:[~2019-09-23 10:10 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-23 10:09 [Xen-devel] [PATCH for-next RFC 0/8] Port Xen to Hyper-V Wei Liu
2019-09-23 10:09 ` [Xen-devel] [PATCH for-next RFC 1/8] x86: introduce CONFIG_GUEST and move code Wei Liu
2019-09-25  9:59   ` Roger Pau Monné
2019-09-23 10:09 ` [Xen-devel] [PATCH for-next RFC 2/8] x86: include asm_defns.h directly in hypercall.h Wei Liu
2019-09-25 10:02   ` Roger Pau Monné
2019-09-23 10:09 ` [Xen-devel] [PATCH for-next RFC 3/8] x86: drop hypervisor_cpuid_base Wei Liu
2019-09-25 10:07   ` Roger Pau Monné
2019-09-23 10:09 ` Wei Liu [this message]
2019-09-25 10:23   ` [Xen-devel] [PATCH for-next RFC 4/8] x86: factor out xen variants for hypervisor setup code Roger Pau Monné
2019-09-27 11:30     ` Wei Liu
2019-09-27 11:39       ` Jan Beulich
2019-09-27 12:47         ` Wei Liu
2019-09-27 12:56           ` Jan Beulich
2019-09-27 11:41       ` Roger Pau Monné
2019-09-27 12:46         ` Wei Liu
2019-09-23 10:09 ` [Xen-devel] [PATCH for-next RFC 5/8] x86: factor out hypervisor agnostic code Wei Liu
2019-09-25 10:39   ` Roger Pau Monné
2019-09-27 11:18     ` Wei Liu
2019-09-23 10:09 ` [Xen-devel] [PATCH for-next RFC 6/8] x86: make probe_xen return boolean value Wei Liu
2019-09-25 10:44   ` Roger Pau Monné
2019-09-27 11:18     ` Wei Liu
2019-09-23 10:09 ` [Xen-devel] [PATCH for-next RFC 7/8] x86: introduce CONFIG_HYPERV and hyperv directory Wei Liu
2019-09-25 10:48   ` Roger Pau Monné
2019-09-27 11:18     ` Wei Liu
2019-09-23 10:09 ` [Xen-devel] [PATCH for-next RFC 8/8] x86: be more verbose when running nested Wei Liu
2019-09-25 10:54   ` Roger Pau Monné
2019-09-23 10:48 ` [Xen-devel] [PATCH for-next RFC 0/8] Port Xen to Hyper-V Paul Durrant
2019-09-23 11:27   ` Wei Liu
2019-09-23 12:11     ` Paul Durrant
2019-09-23 12:54       ` Wei Liu
2019-09-23 13:33         ` Wei Liu
2019-09-23 13:47           ` Paul Durrant
2019-09-23 14:21             ` Wei Liu
2019-09-23 14:39               ` Paul Durrant
2019-09-23 14:41                 ` Wei Liu
2019-09-25 11:02 ` Roger Pau Monné
2019-09-25 15:36   ` Wei Liu
2019-09-26 10:37     ` Wei Liu
2019-09-26 10:41     ` Roger Pau Monné
2019-09-26 10:50       ` 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=20190923100931.29670-5-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.