[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: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Jason Andryuk <jason.andryuk@xxxxxxx>
- Date: Tue, 8 Oct 2024 12:46:37 -0400
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=apertussolutions.com 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=Ggs4u9f4wToqGfelIm34kwcDn/0okzUSJlpz+rflH78=; b=ygAI11rAK1mzdfJa5vYFDqbTkXN+kwh6D2ZCaKVJr3WnZKl4DNf/Och9NzPLIleybxhDMxaD8PZIwHQNlj5YYy/g5jgOpdyzklJQt931LxiNlxupAU+oDBhBcP/FV9tRIBTpllVg+SAJlOqy0yBm+BruXddw6Oejgv3gnRIkvWakrFQCDVcZq7fHwj5aDIT70pmQuNn+bAUSEtfiNzbaE6paf76VFSKneDL1Pj2vv1rBrwyZB66cwaMa1HRPNCHa+6p2N8Lo2HP7TTVcd78gBjNBNq5S4T4r4zXfYqAGRddPA3upzseYmX+yGZtW6UuBUHF2IEU4zgb6GwJIDYZ+zA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=QgMbhfFPqV4htO4diNte3ToxVgU5Jl9BbGhoHRXz7zlfA54GsnTurrq2TZN8tBuNHBF/fzhUdoADzHqhN9OLO8Tynufry3trLoV1ikqALaQOQ/RkpHdP2sa0YaBtGcebYh6uNhxUd7XkxzW7ZnewoT/0UaKgyYieeAIvFISJujnUw8Ik5RGEKHxKCxeuUQBeTkcKS4Mh/wW8I/LvjQHhCJO9L+EEE9U41AZ6BBFOcU0DcEKKKYHLoygTSy8lWx8JGkTHyzhB8+gjOaRXWFDHHQQUFifN3lDNrBKIHgjq72DzmTtJUyHATDe4RjtUx0RZEOHuwIIwqqEKEjvxhyLTPA==
- 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: Tue, 08 Oct 2024 16:46:50 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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?
Regards,
Jason
{
- bi->nr_modules = sizeof(module_map) * 8;
- printk("Excessive boot modules - using the first %u only\n",
+ bi->nr_modules = MAX_NR_BOOTMODS + 1;
+ printk("Excessive multiboot modules - using the first %u only\n",
bi->nr_modules);
}
- bitmap_fill(module_map, bi->nr_modules);
- __clear_bit(0, module_map); /* Dom0 kernel is always first */
+ /* Dom0 kernel is always first */
bi->mods[0].type = BOOTMOD_KERNEL;
bi->mods[0].flags |= BOOTMOD_FLAG_X86_CONSUMED;
|