All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Daniel Kiper <daniel.kiper@oracle.com>, xen-devel@lists.xenproject.org
Cc: jgross@suse.com, keir@xen.org, ian.campbell@citrix.com,
	stefano.stabellini@eu.citrix.com, ross.philipson@citrix.com,
	roy.franz@linaro.org, ning.sun@intel.com, jbeulich@suse.com,
	qiaowei.ren@intel.com, richard.l.maliszewski@intel.com,
	gang.wei@intel.com, fu.wei@linaro.org
Subject: Re: [PATCH for-xen-4.5 v4 10/18] x86: move cmdline from mbi to boot_info
Date: Fri, 17 Oct 2014 22:27:08 +0100	[thread overview]
Message-ID: <544189AC.9060701@citrix.com> (raw)
In-Reply-To: <1413555132-22138-11-git-send-email-daniel.kiper@oracle.com>

On 17/10/2014 15:12, Daniel Kiper wrote:
> Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>

After adjusting for relevant review given in previous patches,

Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>

> ---
>   xen/arch/x86/boot_info.c        |   10 ++++------
>   xen/arch/x86/efi/efi-boot.h     |    8 +++-----
>   xen/arch/x86/setup.c            |    4 +---
>   xen/common/efi/runtime.c        |    1 +
>   xen/include/asm-x86/boot_info.h |    3 +++
>   5 files changed, 12 insertions(+), 14 deletions(-)
>
> diff --git a/xen/arch/x86/boot_info.c b/xen/arch/x86/boot_info.c
> index a81e98b..7d8b0e5 100644
> --- a/xen/arch/x86/boot_info.c
> +++ b/xen/arch/x86/boot_info.c
> @@ -30,6 +30,7 @@ static multiboot_info_t __read_mostly mbi;
>   
>   static boot_info_t __read_mostly boot_info_mb = {
>       .boot_loader_name = "UNKNOWN",
> +    .cmdline = NULL,
>       .warn_msg = NULL,
>       .err_msg = NULL
>   };
> @@ -40,12 +41,6 @@ unsigned long __init __init_mbi(u32 mbd_pa)
>   
>       enable_bsp_exception_support();
>   
> -    if ( mbd->cmdline )
> -    {
> -        mbi.flags |= MBI_CMDLINE;
> -        mbi.cmdline = mbd->cmdline;
> -    }
> -
>       if ( mbd->mem_lower || mbd->mem_upper )
>       {
>           mbi.flags |= MBI_MEMLIMITS;
> @@ -77,5 +72,8 @@ boot_info_t __init *__init_boot_info(u32 mbd_pa)
>       if ( mbd->boot_loader_name )
>           boot_info_mb.boot_loader_name = __va(mbd->boot_loader_name);
>   
> +    if ( mbd->cmdline )
> +        boot_info_mb.cmdline = __va(mbd->cmdline);
> +
>       return &boot_info_mb;
>   }
> diff --git a/xen/arch/x86/efi/efi-boot.h b/xen/arch/x86/efi/efi-boot.h
> index 19be165..f02e604 100644
> --- a/xen/arch/x86/efi/efi-boot.h
> +++ b/xen/arch/x86/efi/efi-boot.h
> @@ -290,10 +290,10 @@ static void __init efi_arch_handle_cmdline(CHAR16 *image_name,
>       {
>           name.w = cmdline_options;
>           w2s(&name);
> -        place_string_u32(&mbi.cmdline, name.s);
> +        place_string_char(&boot_info_efi.cmdline, name.s);
>       }
>       if ( cfgfile_options )
> -        place_string_u32(&mbi.cmdline, cfgfile_options);
> +        place_string_char(&boot_info_efi.cmdline, cfgfile_options);
>       /* Insert image name last, as it gets prefixed to the other options. */
>       if ( image_name )
>       {
> @@ -302,10 +302,8 @@ static void __init efi_arch_handle_cmdline(CHAR16 *image_name,
>       }
>       else
>           name.s = "xen";
> -    place_string_u32(&mbi.cmdline, name.s);
> +    place_string_char(&boot_info_efi.cmdline, name.s);
>   
> -    if ( mbi.cmdline )
> -        mbi.flags |= MBI_CMDLINE;
>       /*
>        * These must not be initialized statically, since the value must
>        * not get relocated when processing base relocations later.
> diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
> index a9dbc05..8f83969 100644
> --- a/xen/arch/x86/setup.c
> +++ b/xen/arch/x86/setup.c
> @@ -578,9 +578,7 @@ void __init noreturn __start_xen(unsigned long mbi_p, boot_info_t *boot_info_ptr
>       }
>   
>       /* Parse the command-line options. */
> -    cmdline = cmdline_cook((mbi->flags & MBI_CMDLINE) ?
> -                           __va(mbi->cmdline) : NULL,
> -                           boot_info->boot_loader_name);
> +    cmdline = cmdline_cook(boot_info->cmdline, boot_info->boot_loader_name);
>       if ( (kextra = strstr(cmdline, " -- ")) != NULL )
>       {
>           /*
> diff --git a/xen/common/efi/runtime.c b/xen/common/efi/runtime.c
> index 7846b2b..ee2ee2d 100644
> --- a/xen/common/efi/runtime.c
> +++ b/xen/common/efi/runtime.c
> @@ -55,6 +55,7 @@ const struct efi_pci_rom *__read_mostly efi_pci_roms;
>   #ifndef CONFIG_ARM /* TODO - disabled until implemented on ARM */
>   boot_info_t __read_mostly boot_info_efi = {
>       .boot_loader_name = "EFI",
> +    .cmdline = NULL,
>       .warn_msg = NULL,
>       .err_msg = NULL
>   };
> diff --git a/xen/include/asm-x86/boot_info.h b/xen/include/asm-x86/boot_info.h
> index 9e68447..44d1674 100644
> --- a/xen/include/asm-x86/boot_info.h
> +++ b/xen/include/asm-x86/boot_info.h
> @@ -33,6 +33,9 @@ typedef struct {
>       /* Boot loader name. */
>       const char *boot_loader_name;
>   
> +    /* Xen command line. */
> +    char *cmdline;
> +
>       /*
>        * Info about warning occurred during boot_info initialization.
>        * NULL if everything went OK.

  reply	other threads:[~2014-10-17 21:27 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-17 14:11 [PATCH for-xen-4.5 v4 00/18] xen: Break multiboot (v1) dependency and add multiboot2 support Daniel Kiper
2014-10-17 14:11 ` [PATCH for-xen-4.5 v4 01/18] xen/makefile: clean target should remove xen.efi binary Daniel Kiper
2014-10-17 14:11 ` [PATCH for-xen-4.5 v4 02/18] x86/boot: fix reloc.S build dependencies Daniel Kiper
2014-10-17 14:51   ` Jan Beulich
2014-10-17 16:10     ` Daniel Kiper
2014-10-17 16:22       ` Jan Beulich
2014-10-17 14:56   ` Andrew Cooper
2014-10-17 15:10     ` Jan Beulich
2014-10-17 14:11 ` [PATCH for-xen-4.5 v4 03/18] x86: define cmdline_cook() loader_name argument as a const Daniel Kiper
2014-10-17 14:11 ` [PATCH for-xen-4.5 v4 04/18] x86/boot: use constant in head.S instead of hardcoded value Daniel Kiper
2014-10-17 15:00   ` Andrew Cooper
2014-10-17 15:52     ` Daniel Kiper
2014-10-17 16:18       ` Jan Beulich
2014-10-17 16:22         ` Daniel Kiper
2014-10-20  8:00           ` Jan Beulich
2014-10-17 14:11 ` [PATCH for-xen-4.5 v4 05/18] x86/boot/reloc: create generic alloc and copy functions Daniel Kiper
2014-10-17 16:04   ` Andrew Cooper
2014-10-17 17:11     ` Daniel Kiper
2014-10-17 17:22       ` Andrew Cooper
2014-10-17 14:11 ` [PATCH for-xen-4.5 v4 06/18] x86: introduce MultiBoot Data (MBD) type Daniel Kiper
2014-10-17 17:14   ` Andrew Cooper
2014-10-17 14:12 ` [PATCH for-xen-4.5 v4 07/18] x86/efi: add place_string_u32() function Daniel Kiper
2014-10-17 14:12 ` [PATCH for-xen-4.5 v4 08/18] x86: introduce boot_info structure Daniel Kiper
2014-10-17 20:55   ` Andrew Cooper
2014-10-17 14:12 ` [PATCH for-xen-4.5 v4 09/18] x86: move boot_loader_name from mbi to boot_info Daniel Kiper
2014-10-17 21:05   ` Andrew Cooper
2014-10-17 14:12 ` [PATCH for-xen-4.5 v4 10/18] x86: move cmdline " Daniel Kiper
2014-10-17 21:27   ` Andrew Cooper [this message]
2014-10-17 14:12 ` [PATCH for-xen-4.5 v4 11/18] x86: move legacy BIOS memory map stuff " Daniel Kiper
2014-10-17 22:08   ` Andrew Cooper
2014-10-17 14:12 ` [PATCH for-xen-4.5 v4 12/18] x86: move modules data from mbi to boot_info and remove mbi Daniel Kiper
2014-10-17 22:35   ` Andrew Cooper
2014-10-20  8:38     ` Jan Beulich
2014-10-17 14:12 ` [PATCH for-xen-4.5 v4 13/18] x86: move EFI memory map stuff to boot_info Daniel Kiper
2014-10-17 14:12 ` [PATCH for-xen-4.5 v4 14/18] x86: move MPS, ACPI and SMBIOS data " Daniel Kiper
2014-10-17 22:51   ` Andrew Cooper
2014-10-17 14:12 ` [PATCH for-xen-4.5 v4 15/18] x86: move video " Daniel Kiper
2014-10-17 22:55   ` Andrew Cooper
2014-10-17 14:12 ` [PATCH for-xen-4.5 v4 16/18] x86: move HDD " Daniel Kiper
2014-10-17 22:57   ` Andrew Cooper
2014-10-17 14:12 ` [PATCH for-xen-4.5 v4 17/18] x86/boot: use %ecx instead of %eax Daniel Kiper
2014-10-17 14:12 ` [PATCH for-xen-4.5 v4 18/18] xen/x86: add multiboot2 protocol support Daniel Kiper
2014-10-17 23:13   ` Andrew Cooper
2014-10-17 14:42 ` [PATCH for-xen-4.5 v4 00/18] xen: Break multiboot (v1) dependency and add multiboot2 support Jan Beulich
2014-10-17 15:49   ` Daniel Kiper
2014-10-23 10:19     ` Jan Beulich
2014-10-23 11:08       ` Andrew Cooper
2014-10-23 14:57         ` Daniel Kiper
2014-10-23 15:26           ` Jan Beulich
2014-10-23 15:50             ` Daniel Kiper
2014-10-23 16:04               ` Jan Beulich
2014-10-23 17:55                 ` konrad wilk
2014-10-24  9:09                   ` Jan Beulich
2014-10-23 15:55           ` Andrew Cooper
2014-10-23 18:04             ` konrad wilk
2014-10-23 21:55               ` Andrew Cooper
2014-10-24  7:07                 ` Daniel Kiper
2014-10-23 11:14       ` Stefano Stabellini
2014-10-23 11:33         ` Jan Beulich
2014-10-17 18:02 ` Roy Franz
2014-10-27 11:09   ` Daniel Kiper

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=544189AC.9060701@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=daniel.kiper@oracle.com \
    --cc=fu.wei@linaro.org \
    --cc=gang.wei@intel.com \
    --cc=ian.campbell@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=jgross@suse.com \
    --cc=keir@xen.org \
    --cc=ning.sun@intel.com \
    --cc=qiaowei.ren@intel.com \
    --cc=richard.l.maliszewski@intel.com \
    --cc=ross.philipson@citrix.com \
    --cc=roy.franz@linaro.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --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.