[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v1 01/18] kconfig: allow configuration of maximum modules
On 06.07.2022 23:04, Daniel P. Smith wrote: > --- a/xen/arch/Kconfig > +++ b/xen/arch/Kconfig > @@ -17,3 +17,15 @@ config NR_CPUS > For CPU cores which support Simultaneous Multi-Threading or similar > technologies, this the number of logical threads which Xen will > support. > + > +config NR_BOOTMODS > + int "Maximum number of boot modules that a loader can pass" > + range 1 32768 > + default "8" if X86 > + default "32" if ARM Any reason for the larger default on Arm, irrespective of dom0less actually being in use? (I'm actually surprised I can't spot a Kconfig option controlling inclusion of dom0less. The default here imo isn't supposed to depend on the architecture, but on whether dom0less is supported. That way if another arch gained dom0less support, the higher default would apply to it without needing further adjustment.) > --- a/xen/arch/x86/efi/efi-boot.h > +++ b/xen/arch/x86/efi/efi-boot.h > @@ -18,7 +18,7 @@ static multiboot_info_t __initdata mbi = { > * The array size needs to be one larger than the number of modules we > * support - see __start_xen(). > */ > -static module_t __initdata mb_modules[5]; > +static module_t __initdata mb_modules[CONFIG_NR_BOOTMODS + 1]; If the build admin selected 1, I'm pretty sure about nothing would work. I think you want max(5, CONFIG_NR_BOOTMODS) or max(4, CONFIG_NR_BOOTMODS) + 1 here and ... > --- a/xen/arch/x86/guest/xen/pvh-boot.c > +++ b/xen/arch/x86/guest/xen/pvh-boot.c > @@ -32,7 +32,7 @@ bool __initdata pvh_boot; > uint32_t __initdata pvh_start_info_pa; > > static multiboot_info_t __initdata pvh_mbi; > -static module_t __initdata pvh_mbi_mods[8]; > +static module_t __initdata pvh_mbi_mods[CONFIG_NR_BOOTMOD + 1]; ... max(8, CONFIG_NR_BOOTMODS) here (albeit the 8 may have room for lowering - I don't recall why 8 was chosen rather than going with the minimum possible value covering all module kinds known at that time). Jan
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |