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

Re: [Xen-devel] [PATCH v4] xen: Allow a default compiled-in command line using Kconfig



>>> On 09.03.17 at 04:13, <blackskygg@xxxxxxxxx> wrote:
> If CMDLINE is set, the cmdline_parse() routine will append the bootloader
> command line to this string, forming the complete command line
> before parsing.

I disagree to making it behave like this: There's no need to
concatenate both, simply parse them one after the other. The
built-in one is well known (and hence also has no need to be in
saved_cmdline). That'll avoid reducing the space available for
user specified options.

> @@ -1566,14 +1557,14 @@ void __init noreturn __start_xen(unsigned long mbi_p)
>  
>      /* Grab the DOM0 command line. */
>      cmdline = (char *)(mod[0].string ? __va(mod[0].string) : NULL);
> -    if ( (cmdline != NULL) || (kextra != NULL) )
> +    if ( (cmdline != NULL) || strlen(kextra) )

Is there any reason why kextra can't come out as NULL if unset,
avoiding the need to touch the code here? That would also avoid
making kextra a static variable.

> --- a/xen/common/Kconfig
> +++ b/xen/common/Kconfig
> @@ -237,4 +237,28 @@ config FAST_SYMBOL_LOOKUP
>         The only user of this is Live patching.
>  
>         If unsure, say Y.
> +
> +config CMDLINE
> +     string "Built-in hypervisor command string"
> +     default ""
> +     ---help---
> +       Enter arguments here that should be compiled into the hypervisor
> +       image and used at boot time.  If the bootloader provides a
> +       command line at boot time, it is appended to this string to
> +       form the full hypervisor command line, when the system boots.
> +       So if the same command line option is not cumulative,
> +       and was set both in this string and in the bootloader command line,
> +       only the latter (i.e. the one in the bootloader command line),
> +       will take effect.
> +
> +config CMDLINE_OVERRIDE
> +     bool "Built-in command line overrides bootloader arguments"
> +     default n
> +     depends on EXPERT = "y"

Personally I think the other option should also be dependent on
EXPERT. And the one here should probably depend on CMDLINE != ""
- if someone really wants to force an empty one, (s)he could make
it be just a single blank.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

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