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

[PATCH v3 02/14] x86: Preinitialise all modules to be of kind BOOTMOD_UNKNOWN


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Alejandro Vallejo <agarciav@xxxxxxx>
  • Date: Fri, 13 Jun 2025 17:13:11 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=weLNhDghvy5grqCkI6xfefJ+ZcBJH01riMFjQPWY3SQ=; b=rg3iR9obO+3DfB2X3XjRuPnZEYzJI+k+ln3Vn5v7bvrbm6OHmov6PBG74zz2gURNbct94VhVTuKio9zv7UDD9PtA510RmoPj1Jc+aCij6hSw2P0qV3CCP+HjOIaTVQsM5oQ9+K70fSmW5DhpnodEpbdCxYCqqcx6E7Dh888M/+dxstRPcq5mooMcUFs93y/ZXWPAC+M8QDdDg6bPhl2U9gw6IVKGjacrJx70lLCSzjlSAQsNZDuJ0zzjriEK60Z1ErxMAcnbfyx2Pb8sRtrOeB7jdT6+GZ+XrIPjMUWs0w1+qKfj/LwkBe5jGIggy/GPhKcWovVgvorYZz/sUaIuoQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=PL0V2z8o5prrW1Cf1eeiZXc8sbVqT9pxgIm1pTQwxCYt05f5GZAhjOS4SJuuraIsvRTutWmOfMjO6FNC2bEBBBn4J0NWb7PILO4k2yOHN+18xzwUQlVirLgEMcfy5bNmXH82yrEI30eWT3eoR3qjaQh2MHD94ebRuku/S5EU6po3eIYjnCjihZCum+lMxFLGYSR0jC5bP0DxL3+0ZPjS3BN3ocv+woSaRj3lz8LOKemunmyayu9GyDqWVVrfj0Cz08G3xGWe0ZY3wMr3WOhbXedTvi/Mkj2xx7m4mNCEpb+pGqXDXj4QpIeppKFxbVtuxXTkvPzFrO/IGD0bKRcAXg==
  • Cc: Alejandro Vallejo <agarciav@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • Delivery-date: Fri, 13 Jun 2025 15:16:40 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

A later patch removes boot_module and replaces its uses with bootmodule.
The equivalent field for "type" doesn't have BOOTMOD_UNKNOWN as a zero
value, so it must be explicitly set in the static xen_boot_info.

Not a functional change.

Signed-off-by: Alejandro Vallejo <agarciav@xxxxxxx>
Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
---
 xen/arch/x86/setup.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index 1f5cb67bd0..7d3b30e1db 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -298,6 +298,12 @@ struct boot_info __initdata xen_boot_info = {
     .loader = "unknown",
     .cmdline = "",
     .domains = { [0 ... MAX_NR_BOOTDOMS - 1] = { .domid = DOMID_INVALID } },
+    /*
+     * There's a MAX_NR_BOOTMODS-th entry in the array. It's not off by one.
+     *
+     * The extra entry exists to be able to add the Xen image as a module.
+     */
+    .mods = { [0 ... MAX_NR_BOOTMODS] = { .type = BOOTMOD_UNKNOWN } },
 };
 
 static struct boot_info *__init multiboot_fill_boot_info(
-- 
2.43.0




 


Rackspace

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