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

Re: [PATCH v5 24/44] x86/boot: remove module_map usage by ramdisk loading


  • To: Jason Andryuk <jason.andryuk@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Date: Wed, 9 Oct 2024 14:36:29 -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=1728498998; h=Content-Type: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=S7xRb9t0TVRaKiVlpoDe5p38KKpnUIzlqsuq6Sm54bo=; b=RWmi38A8lTLYDTLrLEVey3C9BD35Hsljj8xpIX282y1kAFlDZMGZaCgt+FGvnXHQTYrRS+miUndqlW/ColhAfm4JoPq0p4CzETAjZoqJVdAl8vMmzoAgmaM5kRZiSxZNe5D5dQ0qIx3KXA3EB19DzHOzwU5dBycGvBeoyl8QAyQ=
  • Arc-seal: i=1; a=rsa-sha256; t=1728498998; cv=none; d=zohomail.com; s=zohoarc; b=MTmfxWxvazSwrTr6ubw18i/0VLL2PwU92ew0L0kXQOEHH2CjZPd0F+yHV6vqYDTkL0gmRO11T287BgdD3UnIUmGUvMjkp/TzGFrKUKWLYHiOc8HldB1x1n643BSUJu03jYW5oYu84f+SIjWLnKjqubpYQg1F5LdGstYoS21Gq0c=
  • Cc: christopher.w.clark@xxxxxxxxx, stefano.stabellini@xxxxxxx, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Wed, 09 Oct 2024 18:36:47 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 10/8/24 12:46, Jason Andryuk wrote:
On 2024-10-06 17:49, Daniel P. Smith wrote:
The ramdisk loading is the last user of module_map, remove
its usage and any remaining remnants of module_map.

Signed-off-by: Daniel P. Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx>
---
  xen/arch/x86/setup.c | 11 +++++------
  1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index b0946216ea3f..0d2ee19998aa 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -1037,7 +1037,7 @@ void asmlinkage __init noreturn __start_xen(unsigned long mbi_p)
      struct boot_info *bi;
      multiboot_info_t *mbi;
      module_t *mod;
-    unsigned long nr_pages, raw_max_page, module_map[1];
+    unsigned long nr_pages, raw_max_page;
      int i, j, e820_warn = 0, bytes = 0;
      unsigned long eb_start, eb_end;
      bool acpi_boot_table_init_done = false, relocated = false;
@@ -1187,15 +1187,14 @@ void asmlinkage __init noreturn __start_xen(unsigned long mbi_p)           panic("dom0 kernel not specified. Check bootloader configuration\n");
      /* Check that we don't have a silly number of modules. */
-    if ( bi->nr_modules > sizeof(module_map) * 8 )
+    if ( bi->nr_modules > MAX_NR_BOOTMODS + 1 )

Don't you want to check MAX_NR_BOOTMODS, to keep the last module for Xen itself?

Good question. I went back to confirm and it does not look like any of the module_map bits was used for tracking xen in the module list. so yes, drop it back down to just MAX_NR_BOOTMODS.

v/r,
dps



 


Rackspace

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