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

[PATCH v7 25/38] x86/boot: convert dom0_construct_pvh to struct boot_module


  • To: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Date: Sun, 20 Oct 2024 20:46:00 -0400
  • 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=1729471615; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=ebv6FBQmIywtxA6+m9LZfpSXV7xXQCPLvSbFsF4UzmI=; b=VhWSYOZNCvOHiJi9zujPVBL2n676Dp1remqwkSmdT+2zCOmqZPyLnDEqqI+jnV9pxeXhoUjsIdtToneRN8WQs4Fc9OrAoOcs8t5FWk0V0pF46gJPhEOivECy8RxNPwIDvdZ2Vr/ijuzXCgOuac9VYNYB8Ugo6RIEgJprk1RIJzw=
  • Arc-seal: i=1; a=rsa-sha256; t=1729471615; cv=none; d=zohomail.com; s=zohoarc; b=cpzfKsLPJDHZ+wGCTOoC4bv0ZMt6IHACr0seNBS4v9uf4XTP6KX6QHm61USy5AeXPoIFV9Y6J+Wmt5DjVV3h+HM1gzIUy0c1gLdnbG81p7hHfT+ndnmWODVJRWCmFnMai9kh0DHq7lETG0j5kQWYDPHIUIChVfPmrVOJasdTgfQ=
  • Cc: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, jason.andryuk@xxxxxxx, christopher.w.clark@xxxxxxxxx, stefano.stabellini@xxxxxxx, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Mon, 21 Oct 2024 00:56:38 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

This changes both the kernel and ramdisk parameters over to struct
boot_module.

Signed-off-by: Daniel P. Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx>
Reviewed-by: Jason Andryuk <jason.andryuk@xxxxxxx>
---
Changes since v6:
- removed unnecessary indentation changes
---
 xen/arch/x86/dom0_build.c             | 3 +--
 xen/arch/x86/hvm/dom0_build.c         | 9 ++++-----
 xen/arch/x86/include/asm/dom0_build.h | 5 ++---
 3 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/xen/arch/x86/dom0_build.c b/xen/arch/x86/dom0_build.c
index 1d05ee53a6d8..71b2e3afc1a1 100644
--- a/xen/arch/x86/dom0_build.c
+++ b/xen/arch/x86/dom0_build.c
@@ -610,8 +610,7 @@ int __init construct_dom0(struct domain *d, const struct 
boot_module *image,
     process_pending_softirqs();
 
     if ( is_hvm_domain(d) )
-        rc = dom0_construct_pvh(d, image->mod, image->headroom, initrd->mod,
-                                cmdline);
+        rc = dom0_construct_pvh(d, image, initrd, cmdline);
     else if ( is_pv_domain(d) )
         rc = dom0_construct_pv(d, image, initrd, cmdline);
     else
diff --git a/xen/arch/x86/hvm/dom0_build.c b/xen/arch/x86/hvm/dom0_build.c
index 3dd913bdb029..0fe63f040936 100644
--- a/xen/arch/x86/hvm/dom0_build.c
+++ b/xen/arch/x86/hvm/dom0_build.c
@@ -1300,9 +1300,8 @@ static void __hwdom_init pvh_setup_mmcfg(struct domain *d)
     }
 }
 
-int __init dom0_construct_pvh(struct domain *d, const module_t *image,
-                              unsigned long image_headroom,
-                              module_t *initrd,
+int __init dom0_construct_pvh(struct domain *d, const struct boot_module 
*image,
+                              struct boot_module *initrd,
                               const char *cmdline)
 {
     paddr_t entry, start_info;
@@ -1347,8 +1346,8 @@ int __init dom0_construct_pvh(struct domain *d, const 
module_t *image,
         return rc;
     }
 
-    rc = pvh_load_kernel(d, image, image_headroom, initrd, 
bootstrap_map(image),
-                         cmdline, &entry, &start_info);
+    rc = pvh_load_kernel(d, image->mod, image->headroom, initrd->mod,
+                         bootstrap_map_bm(image), cmdline, &entry, 
&start_info);
     if ( rc )
     {
         printk("Failed to load Dom0 kernel\n");
diff --git a/xen/arch/x86/include/asm/dom0_build.h 
b/xen/arch/x86/include/asm/dom0_build.h
index 3ddd22fad2ba..5d0c4fd2639a 100644
--- a/xen/arch/x86/include/asm/dom0_build.h
+++ b/xen/arch/x86/include/asm/dom0_build.h
@@ -17,9 +17,8 @@ int dom0_construct_pv(struct domain *d, const struct 
boot_module *image,
                       struct boot_module *initrd,
                       const char *cmdline);
 
-int dom0_construct_pvh(struct domain *d, const module_t *image,
-                       unsigned long image_headroom,
-                       module_t *initrd,
+int dom0_construct_pvh(struct domain *d, const struct boot_module *image,
+                       struct boot_module *initrd,
                        const char *cmdline);
 
 unsigned long dom0_paging_pages(const struct domain *d,
-- 
2.30.2




 


Rackspace

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