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

[RFC 31/38] x86/hyperlaunch: move boot module discard to domain builder


  • To: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Date: Sat, 19 Apr 2025 18:08:13 -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=1745100571; 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=DQEG8mIjNUEnBFfKy/NUA5oCT0cynfg6veEbEk7wCvA=; b=XtRj1fE1S+3oSdcgO5sH9TkC3OSk/HLsOc3XQ/jaunuJMdvyodkphu6hYBTVtz8ZH7f1JuPXctBW99t15Kt0uH8ERrqZZNJ1V8fV9kpgoiKcpUWuStXO8/SEIeOGXMRM/t8tQIfn+ymn3ZERFQxXsfreG97RobxlZsKdJBxRDz8=
  • Arc-seal: i=1; a=rsa-sha256; t=1745100571; cv=none; d=zohomail.com; s=zohoarc; b=ACFX41L7aYz26PiP6maGudGgR0vSKrM9BZh+cxVP9DokHpRGb11saJoTLwY+riTWZ/3lttDGtj7Wee23bsfMaDKHb0JGfHDONCkjT032rem08ghPN0yryofM8YO5+fyfizxgCNwPSNf0eyDUqqFaj5vt+PuAxN7PD687bNtBlZE=
  • Cc: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, jason.andryuk@xxxxxxx, stefano.stabellini@xxxxxxx, agarciav@xxxxxxx, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Sat, 19 Apr 2025 22:13:36 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Relocate the call to discard boot modules from inside the domain
construction logic to the top level domain builder. This will
ensure modules are not discarded until after all domains have been
constructed.

Signed-off-by: Daniel P. Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx>
---
 xen/arch/x86/domain-builder/core.c | 5 ++++-
 xen/arch/x86/hvm/dom_build.c       | 3 ---
 xen/arch/x86/pv/dom0_build.c       | 3 ---
 3 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/xen/arch/x86/domain-builder/core.c 
b/xen/arch/x86/domain-builder/core.c
index e21f5efbfe62..901efce62a61 100644
--- a/xen/arch/x86/domain-builder/core.c
+++ b/xen/arch/x86/domain-builder/core.c
@@ -8,8 +8,8 @@
 #include <xen/lib.h>
 
 #include <asm/bootinfo.h>
-#include <asm/setup.h>
 #include <asm/domain-builder.h>
+#include <asm/setup.h>
 
 #include "fdt.h"
 
@@ -116,6 +116,9 @@ unsigned int __init builder_create_domains(struct boot_info 
*bi)
     if ( bd->d )
         build_count++;
 
+    /* Free temporary buffers. */
+    free_boot_modules();
+
     return build_count;
 }
 
diff --git a/xen/arch/x86/hvm/dom_build.c b/xen/arch/x86/hvm/dom_build.c
index 2798542e5483..a847c2cb16d9 100644
--- a/xen/arch/x86/hvm/dom_build.c
+++ b/xen/arch/x86/hvm/dom_build.c
@@ -854,9 +854,6 @@ static int __init pvh_load_kernel(
         last_addr = ROUNDUP(last_addr, PAGE_SIZE);
     }
 
-    /* Free temporary buffers. */
-    free_boot_modules();
-
     if ( bd->cmdline )
     {
         rc = hvm_copy_to_guest_phys(last_addr, bd->cmdline,
diff --git a/xen/arch/x86/pv/dom0_build.c b/xen/arch/x86/pv/dom0_build.c
index c3d269438313..8d941ff4486e 100644
--- a/xen/arch/x86/pv/dom0_build.c
+++ b/xen/arch/x86/pv/dom0_build.c
@@ -865,9 +865,6 @@ static int __init dom0_construct(struct boot_domain *bd)
         init_hypercall_page(d, _p(parms.virt_hypercall));
     }
 
-    /* Free temporary buffers. */
-    free_boot_modules();
-
     /* Set up start info area. */
     si = (start_info_t *)vstartinfo_start;
     clear_page(si);
-- 
2.30.2




 


Rackspace

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