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

Re: [PATCH v5 33/44] x86/boot: convert initial_images to struct boot_module


  • To: Jason Andryuk <jason.andryuk@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Date: Wed, 9 Oct 2024 19:15:56 -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=1728515760; 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=sFkSlqkzBqDOdveIXNPtblXiwMTRabpMWQoVqK0wUPo=; b=lvk1u6uRvaPFIPM0yIa8QMCZkKNHY9FYaFlDkMEuuoD8FJ2r7JPPpavoffWGUFKj7QOXwQ+08AGKoNCd9gIUPHZGnExA9Vfa8m5N0ghLz7BbuzP6WJJwHRd2fv48/7rEZ32uDGyly8r8hFQIvCAGL8YVaEiIzE/MUVyesDambYo=
  • Arc-seal: i=1; a=rsa-sha256; t=1728515760; cv=none; d=zohomail.com; s=zohoarc; b=WGj+cu4FeL//7RPg/Lkv1zYSfn6pNwJ1cAM79YBT9FmSCPCFDUOHPcJe7Xhaf88YJHy3pXjixxvkJGeVkupfRzqTIJEEpapOZ5mCKBOmyQemYqcGZRyb4nTSHeSni3YlS7vBNX6Q6xEikrAuF/G2eRsXP08Q2oPgFQ9Whjpei8g=
  • 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 23:16:13 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 10/8/24 14:52, Jason Andryuk wrote:
On 2024-10-06 17:49, Daniel P. Smith wrote:
The variable initial_images is used for tracking the boot modules passed in by the boot loader. Convert to a struct boot_module and adjust the code that uses
it accordingly.

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

diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index d5916e85f68e..30a139074833 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c

@@ -336,8 +336,9 @@ unsigned long __init initial_images_nrpages(nodeid_t node)
      for ( nr = i = 0; i < bi->nr_modules; ++i )
      {
-        unsigned long start = initial_images[i].mod_start;
-        unsigned long end = start + PFN_UP(initial_images[i].mod_end);
+        unsigned long start = initial_images[i].mod->mod_start;
+        unsigned long end = start +
+                            PFN_UP(initial_images[i].mod->mod_end);

This can fit on a single line.

Ack.

          if ( end > node_start && node_end > start )
              nr += min(node_end, end) - max(node_start, start);
@@ -353,10 +354,12 @@ void __init discard_initial_images(void)
      for ( i = 0; i < bi->nr_modules; ++i )
      {
-        uint64_t start = (uint64_t)initial_images[i].mod_start << PAGE_SHIFT;
+        uint64_t start =
+            (uint64_t)initial_images[i].mod->mod_start << PAGE_SHIFT;
          init_domheap_pages(start,
-                           start + PAGE_ALIGN(initial_images[i].mod_end));
+                           start +
+                           PAGE_ALIGN(initial_images[i].mod->mod_end));

This can fit on a single line.

Ack.

      }
      bi->nr_modules = 0;

With those fixed:
Reviewed-by: Jason Andryuk <jason.andryuk@xxxxxxx>

Thanks!

v/r,
dps



 


Rackspace

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