[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[RFC 08/10] hyperlaunch: make create_dom0 externally callable


  • To: Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Date: Fri, 17 Dec 2021 18:34:34 -0500
  • Arc-authentication-results: i=1; mx.zohomail.com; dkim=pass header.i=apertussolutions.com; spf=pass smtp.mailfrom=dpsmith@xxxxxxxxxxxxxxxxxxxx; dmarc=pass header.from=<dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1639769537; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=NYrY0kc0PHr/rCAcUSGijUpEU56IAIoRqii3V14eoTI=; b=BxQlmzT/teJ8KfB46gnAETi7ncIf62r89zV6IKm5BcazW98ua2SBnQszyltqWHZ9BiNH1Gz8kVgNfF9MC0kk3SDWmmE+NiGQaFAmuS8BOsB6gfelW1w7P0pWTMrxnzJ+L4YIPLHGd816QfyOLAXJpv9Rg3k47/mXXSDYcOcipUY=
  • Arc-seal: i=1; a=rsa-sha256; t=1639769537; cv=none; d=zohomail.com; s=zohoarc; b=OsGAQ/VNAFE26cjZThMusRRk78fqvUF8U7Et/uxu+6oyDS6nW4jHhfXr4zuhIHr0szS5SsSiR9oIXFDs6Lx5xmza2lbJKnN2DvfVqTLwxkKPAIo+Hw22Eyg6TzFayGWiyFeW3Pc3tUKpfSXhkJtA+jswn1Y8FjoplrBGM6mb7eM=
  • Cc: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, Christopher Clark <christopher.clark@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Fri, 17 Dec 2021 19:39:33 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

This commit is for the RFC only to enable a quick demonstration of starting Xen
via hyperlaunch. Final version of hyperlaunch will have its own domain
construction function that will replace the RFC usage of create_dom0.

Signed-off-by: Daniel P. Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx>
Reviewed-by: Christopher Clark <christopher.clark@xxxxxxxxxx>
---
 xen/arch/x86/include/asm/setup.h | 5 +++++
 xen/arch/x86/setup.c             | 8 ++++----
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/xen/arch/x86/include/asm/setup.h b/xen/arch/x86/include/asm/setup.h
index 7dc03b6b8d..71f5aaa9b1 100644
--- a/xen/arch/x86/include/asm/setup.h
+++ b/xen/arch/x86/include/asm/setup.h
@@ -34,6 +34,11 @@ static inline void vesa_init(void) {};
 static inline void vesa_mtrr_init(void) {};
 #endif
 
+struct domain *__init create_dom0(const module_t *image,
+                                  unsigned long headroom,
+                                  module_t *initrd, const char *kextra,
+                                  const char *loader);
+
 int construct_dom0(
     struct domain *d,
     const module_t *kernel, unsigned long kernel_headroom,
diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index 4bf84c17e4..bee221d5ee 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -755,10 +755,10 @@ static unsigned int __init copy_bios_e820(struct 
e820entry *map, unsigned int li
     return n;
 }
 
-static struct domain *__init create_dom0(const module_t *image,
-                                         unsigned long headroom,
-                                         module_t *initrd, const char *kextra,
-                                         const char *loader)
+struct domain *__init create_dom0(const module_t *image,
+                                  unsigned long headroom,
+                                  module_t *initrd, const char *kextra,
+                                  const char *loader)
 {
     struct xen_domctl_createdomain dom0_cfg = {
         .flags = IS_ENABLED(CONFIG_TBOOT) ? XEN_DOMCTL_CDF_s3_integrity : 0,
-- 
2.20.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.