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

Re: [RFC PATCH 1/4] kconfig: allow configuration of maximum modules


  • To: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Tue, 31 May 2022 15:52:42 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=cIn1C4Yf2sYQVQqc1+sjrjhbdIG+DLfOkbzzWo1orWk=; b=TvM1ZD6Qxk+cz82MPPBZU3z/CF1uM+ma5kI3mK66n4nhbcerRpuACpTKs++8HkpwyJ3vlZb/N0fK2cPIl2sDPi6SnydOpNi3x0fM1h4dDvAPkrjzmVtES8Ck2hk/LTRYjSdCBxySnSSyjSuRNagvcXR6myzwhppgB5wnN8nTd+4iotQOcgUsiZ8ffbH5TP1aXUBYZtw+XUg1igeZcxlO1U9YIYO3ouFQ7wpqBkyoXX1LxzilBaaA7UFLkXdZpV5XK7dRzmXNTWQOSJDPOHVipnrZPIKA6q5YZIO57vQCw47wZr3A0SwEJqLCAxmsYCkFYy7OR0xbGUh8RR/U82lMwQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Xv6790iImzoRyx26sREWnVKDXHVukJAe+czRMQ/cawM8PcDyVAMoufv0/KyEtb9B4P/Lh6HLQd7Zb5v1SDhZnITx2XefqetKu1dcuTPOmXbQfNtRmCLT741gzl2v5K8XLZfTG1hx+r3a8fn0lrBm+u6XasVhxUbtk/OSAFM0Maq1ZBzmnLYsNL3otYZBHDOusAoP4V5IXD1RN0oGWSlTzmD+cK4ydsVQcz9Y3aHjRUgUCyaGp5BrjYklqyfcIReYjQ/71BLxZFpVhmEwEykF2MVw1+zPCMOXfzVKYf1xtkaphVcFdYGRt4NSO2tp5q2foe3ykEDFLZKukm+z5m3adA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Wei Liu <wl@xxxxxxx>, "scott.davis@xxxxxxxxxx" <scott.davis@xxxxxxxxxx>, "christopher.clark@xxxxxxxxxx" <christopher.clark@xxxxxxxxxx>, "sstabellini@xxxxxxxxxx" <sstabellini@xxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>
  • Delivery-date: Tue, 31 May 2022 13:52:55 +0000
  • Ironport-data: A9a23:Po/+jKpA0ucsZ6uP1mxESX3aH8FeBmK/ZBIvgKrLsJaIsI4StFCzt garIBmCaavbNmDzLoogOoSy8k1XvseHyYIyQQVr/ygwQntEoJuZCYyVIHmrMnLJJKUvbq7GA +byyDXkBJppJpMJjk71atANlVEliefQAOCU5NfsYkidfyc9IMsaoU8lyrdRbrJA24DjWVvQ4 oqq+aUzBXf+s9JKGjNMg068gEsHUMTa4Fv0aXRnOJinFHeH/5UkJMp3yZOZdhMUcaENdgKOf M7RzanRw4/s10xF5uVJMFrMWhZirrb6ZWBig5fNMkSoqkAqSicais7XOBeAAKv+Zvrgc91Zk b1wWZKMpQgBPPWdmPVDdDBjLH96AqNk5KHmfCiYvpnGp6HGWyOEL/RGKmgTZNdd39ktRGZE+ LofNSwHaQ2Fi6Su2rWnR+Jwh8Mlas72IIcYvXImxjbcZRokacm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v002cwmMG9zNxvizylSKZ2XLz4O9y69Mwc/Upf/6UkUoJh7p3FotvD30E1wtq7VcKM0md gsAp4Y642mcfVmHJ6VJN1xNfdfWVa9Ni4lDgqpUCTaPZBCHU7xgLjKx5hwzN2WWfUzvegPcd L6IRhliVI=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Tue, May 31, 2022 at 06:45:52AM -0400, Daniel P. Smith wrote:
> On 5/31/22 05:07, Bertrand Marquis wrote:
> > Hi Daniel,
> 
> Greetings Bertrand.
> 
> >> On 31 May 2022, at 03:41, Daniel P. Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx> 
> >> wrote:
> >>
> >> For x86 the number of allowable multiboot modules varies between the 
> >> different
> >> entry points, non-efi boot, pvh boot, and efi boot. In the case of both 
> >> Arm and
> >> x86 this value is fixed to values based on generalized assumptions. With
> >> hyperlaunch for x86 and dom0less on Arm, use of static sizes results in 
> >> large
> >> allocations compiled into the hypervisor that will go unused by many use 
> >> cases.
> >>
> >> This commit introduces a Kconfig variable that is set with sane defaults 
> >> based
> >> on configuration selection. This variable is in turned used as the array 
> >> size
> >> for the cases where a static allocated array of boot modules is declared.
> >>
> >> Signed-off-by: Daniel P. Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx>
> >> ---
> >> xen/arch/Kconfig                  | 12 ++++++++++++
> >> xen/arch/arm/include/asm/setup.h  |  5 +++--
> >> xen/arch/x86/efi/efi-boot.h       |  2 +-
> >> xen/arch/x86/guest/xen/pvh-boot.c |  2 +-
> >> xen/arch/x86/setup.c              |  4 ++--
> >> 5 files changed, 19 insertions(+), 6 deletions(-)
> >>
> >> diff --git a/xen/arch/Kconfig b/xen/arch/Kconfig
> >> index f16eb0df43..57b14e22c9 100644
> >> --- 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 64
> >> +  default "8" if X86
> >> +  default "32" if ARM
> >> +  help
> >> +    Controls the build-time size of various arrays allocated for
> >> +    parsing the boot modules passed by a loader when starting Xen.
> >> +
> >> +    This is of particular interest when using Xen's hypervisor domain
> >> +    capabilities such as dom0less.
> >> diff --git a/xen/arch/arm/include/asm/setup.h 
> >> b/xen/arch/arm/include/asm/setup.h
> >> index 2bb01ecfa8..312a3e4209 100644
> >> --- a/xen/arch/arm/include/asm/setup.h
> >> +++ b/xen/arch/arm/include/asm/setup.h
> >> @@ -10,7 +10,8 @@
> >>
> >> #define NR_MEM_BANKS 256
> >>
> >> -#define MAX_MODULES 32 /* Current maximum useful modules */
> >> +/* Current maximum useful modules */
> >> +#define MAX_MODULES CONFIG_NR_BOOTMODS
> >>
> >> typedef enum {
> >>     BOOTMOD_XEN,
> >> @@ -38,7 +39,7 @@ struct meminfo {
> >>  * The domU flag is set for kernels and ramdisks of "xen,domain" nodes.
> >>  * The purpose of the domU flag is to avoid getting confused in
> >>  * kernel_probe, where we try to guess which is the dom0 kernel and
> >> - * initrd to be compatible with all versions of the multiboot spec. 
> >> + * initrd to be compatible with all versions of the multiboot spec.
> > 
> > This seems to be a spurious change.
> 
> I have been trying to clean up trailing white space when I see it
> nearby. I can drop this one if that is desired.

IMO it's best if such white space removal is only done when already
modifying the line, or else it makes it harder to track changes when
using `git blame` for example (not likely in this case since it's a
multi line comment).

Thanks, Roger.



 


Rackspace

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