All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien@xen.org>
To: Stefano Stabellini <sstabellini@kernel.org>,
	xen-devel@lists.xenproject.org
Cc: jgross@suse.com, Bertrand.Marquis@arm.com,
	Volodymyr_Babchuk@epam.com,
	Stefano Stabellini <stefano.stabellini@xilinx.com>
Subject: Re: [PATCH v7 3/7] xen: introduce xen,enhanced dom0less property
Date: Sat, 14 May 2022 14:23:03 +0100	[thread overview]
Message-ID: <898455df-f076-46ac-0c86-d11b3e9e5905@xen.org> (raw)
In-Reply-To: <20220513210730.679871-3-sstabellini@kernel.org>

Hi Stefano,

On 13/05/2022 22:07, Stefano Stabellini wrote:
> diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
> index c4dd211b91..8d148b209d 100644
> --- a/xen/arch/arm/domain_build.c
> +++ b/xen/arch/arm/domain_build.c
> @@ -3157,6 +3157,7 @@ static int __init construct_domU(struct domain *d,
>                                    const struct dt_device_node *node)
>   {
>       struct kernel_info kinfo = {};
> +    const char *dom0less_enhanced;
>       int rc;
>       u64 mem;
>   
> @@ -3172,6 +3173,17 @@ static int __init construct_domU(struct domain *d,
>   
>       kinfo.vpl011 = dt_property_read_bool(node, "vpl011");
>   
> +    rc = dt_property_read_string(node, "xen,enhanced", &dom0less_enhanced);
> +    if ( rc == -EILSEQ ||
> +         rc == -ENODATA ||
> +         (rc == 0 && !strcmp(dom0less_enhanced, "enabled")) )
> +    {
> +        if ( hardware_domain )
> +            kinfo.dom0less_enhanced = true;
> +        else
> +            printk("Error: tried to use xen,enhanced without dom0\n");

In general, I prefer if we fail early for configuration error because 
this makes a lot more obvious what the issue is.

So I would switch to panic() and drop "Error:". This can be done on commit:

Acked-by: Julien Grall <jgrall@amazon.com>

Cheers,

-- 
Julien Grall


  reply	other threads:[~2022-05-14 13:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-13 21:07 [PATCH v7 0/7] dom0less PV drivers Stefano Stabellini
2022-05-13 21:07 ` [PATCH v7 1/7] xen/dt: of_property_read_string return -ENODATA when !length Stefano Stabellini
2022-05-13 21:07 ` [PATCH v7 2/7] xen/arm: implement domU extended regions Stefano Stabellini
2022-05-13 21:07 ` [PATCH v7 3/7] xen: introduce xen,enhanced dom0less property Stefano Stabellini
2022-05-14 13:23   ` Julien Grall [this message]
2022-05-13 21:07 ` [PATCH v7 4/7] xen/arm: configure dom0less domain for enabling xenstore after boot Stefano Stabellini
2022-05-13 21:07 ` [PATCH v7 5/7] xenstored: send an evtchn notification on introduce_domain Stefano Stabellini
2022-05-23  6:06   ` Juergen Gross
2022-05-13 21:07 ` [PATCH v7 6/7] tools: add example application to initialize dom0less PV drivers Stefano Stabellini
2022-05-14 16:19   ` Julien Grall
2022-05-24 23:34     ` Stefano Stabellini
2022-05-13 21:07 ` [PATCH v7 7/7] docs: document dom0less + " Stefano Stabellini

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=898455df-f076-46ac-0c86-d11b3e9e5905@xen.org \
    --to=julien@xen.org \
    --cc=Bertrand.Marquis@arm.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=jgross@suse.com \
    --cc=sstabellini@kernel.org \
    --cc=stefano.stabellini@xilinx.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.