xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@arm.com>
To: Stefano Stabellini <sstabellini@kernel.org>
Cc: xen-devel@lists.xenproject.org, nd@arm.com
Subject: Re: [PATCH v2] xen/arm: warn if dom0_mem is not specified
Date: Sun, 19 Feb 2017 16:23:56 +0000	[thread overview]
Message-ID: <cfccffb7-e79f-c1a8-b4a8-da2581e406f5@arm.com> (raw)
In-Reply-To: <1487381346-3572-1-git-send-email-sstabellini@kernel.org>

Hi Stefano,

On 02/18/2017 01:29 AM, Stefano Stabellini wrote:
> The default dom0_mem is 128M which is not sufficient to boot a Ubuntu
> based Dom0. It is not clear what a better default value could be.
>
> Instead, loadly warn the user when dom0_mem is unspecified and wait 3
> secs. Then use 512M.
>
> Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
> ---
>  xen/arch/arm/domain_build.c | 22 +++++++++++++++++-----

Please update the documentation in docs/misc/xen-commandline.markdown.

Cheers,

>  1 file changed, 17 insertions(+), 5 deletions(-)
>
> diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
> index c97a1f5..db7471f 100644
> --- a/xen/arch/arm/domain_build.c
> +++ b/xen/arch/arm/domain_build.c
> @@ -1,4 +1,5 @@
>  #include <xen/config.h>
> +#include <xen/delay.h>
>  #include <xen/init.h>
>  #include <xen/compile.h>
>  #include <xen/lib.h>
> @@ -31,14 +32,11 @@ integer_param("dom0_max_vcpus", opt_dom0_max_vcpus);
>
>  int dom0_11_mapping = 1;
>
> -#define DOM0_MEM_DEFAULT 0x8000000 /* 128 MiB */
> -static u64 __initdata dom0_mem = DOM0_MEM_DEFAULT;
> +static u64 __initdata dom0_mem;
>
>  static void __init parse_dom0_mem(const char *s)
>  {
>      dom0_mem = parse_size_and_unit(s, &s);
> -    if ( dom0_mem == 0 )
> -        dom0_mem = DOM0_MEM_DEFAULT;
>  }
>  custom_param("dom0_mem", parse_dom0_mem);
>
> @@ -2125,7 +2123,21 @@ int construct_dom0(struct domain *d)
>      BUG_ON(d->vcpu[0] == NULL);
>      BUG_ON(v->is_initialised);
>
> -    printk("*** LOADING DOMAIN 0 ***\n");
> +    if ( dom0_mem > 0 )
> +        printk("*** LOADING DOMAIN 0 ***\n");
> +    else
> +    {
> +        int i;
> +        printk("*** PLEASE SPECIFY dom0_mem PARAMETER - USING 512M FOR NOW ***\n");
> +        for (i = 0; i < 3; i++)
> +        {
> +            printk("%d...", i+1);
> +            mdelay(1000);
> +        }
> +        printk("\n");
> +        dom0_mem = MB(512);
> +    }
> +
>
>      iommu_hwdom_init(d);
>
>

-- 
Julien Grall

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

      reply	other threads:[~2017-02-19 16:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-18  1:29 [PATCH v2] xen/arm: warn if dom0_mem is not specified Stefano Stabellini
2017-02-19 16:23 ` Julien Grall [this message]

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=cfccffb7-e79f-c1a8-b4a8-da2581e406f5@arm.com \
    --to=julien.grall@arm.com \
    --cc=nd@arm.com \
    --cc=sstabellini@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).