All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: "Daniel P. Smith" <dpsmith@apertussolutions.com>
Cc: Bertrand Marquis <Bertrand.Marquis@arm.com>,
	xen-devel <xen-devel@lists.xenproject.org>,
	Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>,
	Wei Liu <wl@xen.org>,
	"scott.davis@starlab.io" <scott.davis@starlab.io>,
	"christopher.clark@starlab.io" <christopher.clark@starlab.io>,
	"sstabellini@kernel.org" <sstabellini@kernel.org>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	George Dunlap <george.dunlap@citrix.com>,
	Jan Beulich <jbeulich@suse.com>, Julien Grall <julien@xen.org>
Subject: Re: [RFC PATCH 1/4] kconfig: allow configuration of maximum modules
Date: Tue, 31 May 2022 15:52:42 +0200	[thread overview]
Message-ID: <YpYdqglsWIlsFsaB@Air-de-Roger> (raw)
In-Reply-To: <4ebbb465-00ec-f4ba-8555-711cd76517ed@apertussolutions.com>

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@apertussolutions.com> 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@apertussolutions.com>
> >> ---
> >> 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.


  parent reply	other threads:[~2022-05-31 13:53 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-31  2:41 [RFC PATCH 0/4] Introducing a common representation of boot info Daniel P. Smith
2022-05-31  2:41 ` [RFC PATCH 1/4] kconfig: allow configuration of maximum modules Daniel P. Smith
2022-05-31  9:07   ` Bertrand Marquis
2022-05-31 10:45     ` Daniel P. Smith
2022-05-31 10:49       ` Bertrand Marquis
2022-05-31 10:56         ` Daniel P. Smith
2022-05-31 13:52       ` Roger Pau Monné [this message]
2022-05-31 13:54         ` Jan Beulich
2022-06-01  7:40         ` George Dunlap
2022-06-01  9:06           ` Roger Pau Monné
2022-06-07 11:34             ` Julien Grall
2022-05-31  9:25   ` Julien Grall
2022-05-31 10:53     ` Daniel P. Smith
2022-06-01 17:35       ` Julien Grall
2022-06-02  8:49         ` Jan Beulich
2022-06-07 11:37           ` Julien Grall
2022-06-03 12:58   ` Jan Beulich
2022-05-31  2:41 ` [RFC PATCH 2/4] headers: introduce generalized boot info Daniel P. Smith
2022-05-31  2:41 ` [RFC PATCH 3/4] x86: adopt new boot info structures Daniel P. Smith
2022-05-31  2:41 ` [RFC PATCH 4/4] x86: refactor entrypoints to new boot info Daniel P. Smith
2022-07-06  7:30 ` [RFC PATCH 0/4] Introducing a common representation of " Henry Wang
2022-07-06  9:01   ` Jan Beulich
2022-07-06  9:28     ` Henry Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YpYdqglsWIlsFsaB@Air-de-Roger \
    --to=roger.pau@citrix.com \
    --cc=Bertrand.Marquis@arm.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=christopher.clark@starlab.io \
    --cc=dpsmith@apertussolutions.com \
    --cc=george.dunlap@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=scott.davis@starlab.io \
    --cc=sstabellini@kernel.org \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.