diff mbox series

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

Message ID 20211217233437.13791-9-dpsmith@apertussolutions.com (mailing list archive)
State New, archived
Headers show
Series Hyperlaunch x86 Dom0 launch | expand

Commit Message

Daniel P. Smith Dec. 17, 2021, 11:34 p.m. UTC
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@apertussolutions.com>
Reviewed-by: Christopher Clark <christopher.clark@starlab.io>
---
 xen/arch/x86/include/asm/setup.h | 5 +++++
 xen/arch/x86/setup.c             | 8 ++++----
 2 files changed, 9 insertions(+), 4 deletions(-)
diff mbox series

Patch

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,