xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@citrix.com>
To: Ian Campbell <ian.campbell@citrix.com>, xen-devel@lists.xenproject.org
Cc: stefano.stabellini@citrix.com
Subject: Re: [PATCH 4/8] xen/arm: Warn when a device tree path will be re-used by Xen
Date: Mon, 28 Sep 2015 16:44:20 +0100	[thread overview]
Message-ID: <56096054.5000102@citrix.com> (raw)
In-Reply-To: <1443197438.25250.186.camel@citrix.com>

Hi Ian,

On 25/09/15 17:10, Ian Campbell wrote:
> On Tue, 2015-09-22 at 18:47 +0100, Julien Grall wrote:
>> Xen is using unconditionnally some device tree path to create DOM0
> 
> "unconditionally"
> 
>> specific node (for instance /psci, /memory and /hypervisor).
>>
>> Rather than blindly add new nodes with the same, print a warning message
>> on the console to let know the user that something may go wrong.
> 
> So it seems to me that /psci and /memory should be pretty common and that
> warning when we deliberately replace them with our own contents seems
> wrong.
>
> I think the bit which the commit message misses out is that we already
> filter out psci and such by compatible string before this point, so this
> warning is only for the case where there is a /psci which is not compatible
> "arm,psci" or "arm,psci-0.2" etc, i.e. it is something strange and special.

Correct. And it's the same for the node /memory. We are removing the
node only when the type is "memory".


> And that case does indeed seem worth warning about but the commit message
> needs to be clearer about the circumstances of the logging.

What about:

"Xen is using unconditionally some device tree path to create DOM0
specific node (for instance /psci, /memory and /hypervisor).

Print a warning message on the console to let know user the user if we
re-use one of this node.

Note that the content of most those nodes are very common and they
should have already been skipped via the compatible string or type
string. This warning is here to catch buggy device-tree and compatible
string that we may not yet support in Xen."

> I wonder if it would be worth printing the compatible strings of the node
> we are clobbering? There's a good chance they will be e.g. "arm,psci-0.3"
> (with no backwards compat) or something and knowing that might be useful.
> But maybe it's too much code to worry about.
> 
> BTW, how did you trip over this?

No specific issue. I wrote this patch because I was thinking to move the
interrupt-controller node in /. Although, I gave up on this idea and I
though this patch would still be useful to catch early buggy DT.

> 
>> +    /*
>> +     * Xen is using some path for its own purpose. Warn if a node
> 
> "paths" and "purposes".
> 
>> +     * already exists with the same path.
>> +     */
>> +    if ( dt_match_node(reserved_matches, node) )
>> +        printk(XENLOG_WARNING "WARNING: Path %s is reserved, skip the
>> node\n",
> 
> Rather than skipping we are actually replacing it with our version. Maybe
> say that?

I would rather keep "skipping" because we may decide to not use this
path based on DOM0 configuration.

Though I can rework the message with:

"WARNING: Patch %s is reserved, skip the node as we may re-use the path.\n"

Regards,

-- 
Julien Grall

  reply	other threads:[~2015-09-28 15:45 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-22 17:47 [PATCH 0/8] xen/arm: gic-v2: Detect automatically aliased GIC400 Julien Grall
2015-09-22 17:47 ` [PATCH 1/8] xen/arm: gic: Make clear the GIC node is passed to make_hwdom_dt_node Julien Grall
2015-09-25 15:48   ` Ian Campbell
2015-09-28 14:49     ` Julien Grall
2015-09-22 17:47 ` [PATCH 2/8] xen/arm: Retrieve the correct number of cells when building dom0 DT Julien Grall
2015-09-25 16:01   ` Ian Campbell
2015-09-28 14:59     ` Julien Grall
2015-09-28 15:19       ` Ian Campbell
2015-09-28 15:25         ` Julien Grall
2015-09-22 17:47 ` [PATCH 3/8] xen/arm: Fix comment coding style in handle_node in domain_build.c Julien Grall
2015-09-25 16:03   ` Ian Campbell
2015-09-25 16:48   ` Ian Campbell
2015-09-22 17:47 ` [PATCH 4/8] xen/arm: Warn when a device tree path will be re-used by Xen Julien Grall
2015-09-25 16:10   ` Ian Campbell
2015-09-28 15:44     ` Julien Grall [this message]
2015-09-28 15:55       ` Ian Campbell
2015-09-28 16:05         ` Julien Grall
2015-09-28 17:46     ` Julien Grall
2015-09-22 17:47 ` [PATCH 5/8] xen/arm: vgic-v2: Drop cbase from arch_domain Julien Grall
2015-09-25 16:11   ` Ian Campbell
2015-09-22 17:47 ` [PATCH 6/8] xen/arm: gic: Check the size of the CPU and vCPU interface retrieved from DT Julien Grall
2015-09-25 16:19   ` Ian Campbell
2015-09-28 16:29     ` Julien Grall
2015-09-22 17:47 ` [PATCH 7/8] xen/arm: gic-v2: Detect automatically aliased GIC400 Julien Grall
2015-09-25 16:26   ` Ian Campbell
2015-09-28 18:07     ` Julien Grall
2015-09-29 10:51       ` Ian Campbell
2015-09-22 17:47 ` [PATCH 8/8] xen/arm: platform: Drop the quirks callback Julien Grall
2015-09-25 16:27   ` Ian Campbell

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=56096054.5000102@citrix.com \
    --to=julien.grall@citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=stefano.stabellini@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 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).