All of lore.kernel.org
 help / color / mirror / Atom feed
From: Will Abele <will.abele@starlab.io>
To: Stefano Stabellini <sstabellini@kernel.org>
Cc: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	Julien Grall <Julien.Grall@arm.com>, nd <nd@arm.com>,
	Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>
Subject: Re: [Xen-devel] [PATCH 0/1] Dom0less guest device tree format
Date: Tue, 9 Jul 2019 13:17:13 +0000	[thread overview]
Message-ID: <20190709131708.z64dbkau54m3fnvb@starlab.io> (raw)
In-Reply-To: <alpine.DEB.2.21.1907081552310.3099@sstabellini-ThinkPad-T480s>

The 07/08/2019 17:28, Stefano Stabellini wrote:
> On Sat, 6 Jul 2019, Will Abele wrote:
> > The 07/06/2019 18:19, Julien Grall wrote:
> > > 
> > > 
> > > On 06/07/2019 19:17, Julien Grall wrote:
> > > > 
> > > > 
> > > > On 06/07/2019 19:02, Will Abele wrote:
> > > >> From: Will Abele <will.abele@starlab.io>
> > > >>
> > > >> Hi,
> > > > 
> > > > Hi,
> > > > 
> > > >> I've been using dom0less Xen on the Hikey 960 with a 4.14 Linux 
> > > >> Kernel. I had
> > > >> trouble getting the 4.14 Linux Kernel to boot as a dom0less domU 
> > > >> because it was
> > > >> misinterpreting the device tree version. Linux 4.14 and earlier 
> > > >> interpret device
> > > >> trees with a "/" in the root node as version 16. Xen produces a 
> > > >> version 17
> > > >> device tree, so the root node needs to be "" to work with 4.14 and 
> > > >> earlier Linux
> > > >> Kernels. Linux 4.15 and later assume that the version is 17, so this 
> > > >> patch does
> > > >> not have any impact.
> > > >>
> > > >> Please let me know if you need any more information or have 
> > > >> suggestions for
> > > >> other ways to handle this.
> > > > 
> > > > I don't understand where the version comes from. I also don't understand 
> > > > how you inferred that Xen is creating a version 17 device-tree.
> > > > 
> > > > Do you have link to the paragraph in the specifications?
> > > 
> > > Also, please expand what is the exact error. So we can understand 
> > > whether this is the right fix.
> > > 
> > > Cheers,
> > > 
> > > -- 
> > > Julien Grall
> > 
> > -- 
> > 
> > Hi Julien,
> > 
> > Thanks for the prompt response.
> > 
> > I said in my message that Linux was interpreting the device tree as version 16.
> > Looking through the code again, I realize it was being interpreted as earlier
> > than 16. As mentioned in Linux commit a7e4cfb0a7ca4773e7d0dd1d9c018ab27a15360e,
> > Linux had already broken support for FDT versions earlier than 16.
> > populate_node() in drivers/of/fdt.c would stop parsing the fdt at the root node
> > if it thought the fdt version was earlier than 16.
> > 
> > Xen sets the FDT version to 17 in fdt_create().
> > 
> > The issue I was having was that Linux panicked while initializing interrupts
> > because it could not find an interrupt controller. It couldn't find the
> > interrupt controller because it didn't process that part of the device tree.
> 
> Thank you, Will! And it is great to hear that you are using dom0less :)
> 
> I couldn't find the specific reference to the spec, but I could verify
> that the patch fixes the issue for Linux 4.14, while it is unneeded for
> newer Linux versions (they still work with the patch). Also we already
> start empty device tree using "" instead of "/" in a few other places. I
> would love to have the right reference in the commit message though.
> 
> FYI we also have another instance of fdt_begin_node(fdt, "/") in
> xen/arch/arm/acpi/domain_build.c that needs fixing and could be done in
> this patch.

Thanks, Stefano! I really appreciate all of your work on dom0less. We're very
excited to use it.

Thanks for pointing out the other instance. I'll fix that, change the commit
message to reference the spec, and send a v2 in a moment.

Thanks,
Will

-- 
Will Abele
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

      reply	other threads:[~2019-07-09 13:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-06 18:02 [Xen-devel] [PATCH 0/1] Dom0less guest device tree format Will Abele
2019-07-06 18:02 ` [Xen-devel] [PATCH 1/1] xen/arm: Use "" instead of "/" for domU root node Will Abele
2019-07-06 18:17 ` [Xen-devel] [PATCH 0/1] Dom0less guest device tree format Julien Grall
2019-07-06 18:19   ` Julien Grall
2019-07-06 21:10     ` Will Abele
2019-07-08  7:39       ` Viktor Mitin
2019-07-08 15:18       ` Julien Grall
2019-07-08 18:27         ` Will Abele
2019-07-08 22:28       ` Stefano Stabellini
2019-07-09 13:17         ` Will Abele [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=20190709131708.z64dbkau54m3fnvb@starlab.io \
    --to=will.abele@starlab.io \
    --cc=Julien.Grall@arm.com \
    --cc=Volodymyr_Babchuk@epam.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 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.