All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Stabellini <sstabellini@kernel.org>
To: Julien Grall <julien.grall@arm.com>
Cc: Julien Grall <julien.grall@gmail.com>,
	xen-devel@lists.xenproject.org,
	Stefano Stabellini <sstabellini@kernel.org>,
	wei.liu2@citrix.com, Steve Capper <Steve.Capper@arm.com>
Subject: Re: [PATCH 0/2] Fix Xen boot on XGene
Date: Fri, 4 Nov 2016 13:24:42 -0700 (PDT)	[thread overview]
Message-ID: <alpine.DEB.2.10.1611041310040.19454@sstabellini-ThinkPad-X260> (raw)
In-Reply-To: <d667084a-10b0-feb2-4f61-81cdc89260ac@arm.com>

On Wed, 2 Nov 2016, Julien Grall wrote:
> Hi Stefano,
> 
> On 01/11/2016 19:29, Stefano Stabellini wrote:
> > On Mon, 31 Oct 2016, Julien Grall wrote:
> > > Hi Stefano,
> > > 
> > > On 26/10/16 23:12, Stefano Stabellini wrote:
> > > > On Wed, 26 Oct 2016, Julien Grall wrote:
> > > > > Hi,
> > > > > Apologize for not respecting the netiquette.
> > > > > 
> > > > > On Tue, 25 Oct 2016, 5:49 p.m. Stefano Stabellini,
> > > > > <sstabellini@kernel.org> wrote:
> > > > >       Hi all,
> > > > > 
> > > > >       the following commit:
> > > > > 
> > > > >       commit 21550029f709072aacf3b90edd574e7d3021b400
> > > > >       Author: Julien Grall <julien.grall@citrix.com>
> > > > >       Date:   Thu Oct 8 19:23:53 2015 +0100
> > > > > 
> > > > >           xen/arm: gic-v2: Automatically detect aliased GIC400
> > > > > 
> > > > > 
> > > > >       removed PLATFORM_QUIRK_GIC_64K_STRIDE and introduced an
> > > > > heuristic to
> > > > >       check whether the two GICC pages have a 64K stride. However the
> > > > >       heuristic needs device tree to report a GICC region size of 128K
> > > > > to
> > > > > work
> > > > >       properly. That is not the case for some versions of XGene
> > > > > (including
> > > > > the
> > > > >       one I am using, kindly provided by CloudLab.us).
> > > > > 
> > > > >       The patch series fixes the issue by reintroducing platform
> > > > > quirks,
> > > > >       PLATFORM_QUIRK_GIC_64K_STRIDE, and forcing GICC size to 128K if
> > > > >       PLATFORM_QUIRK_GIC_64K_STRIDE.
> > > > > 
> > > > >       We should consider this series for 4.8.
> > > > > 
> > > > > 
> > > > > The platform you are using has likely a buggy firmware (I cannot find
> > > > > the
> > > > > mail from
> > > > > APM stating that).
> > > > > 
> > > > > I am not convinced that we should support a such case. IIRC unmodified
> > > > > Linux will
> > > > > not work properly on those platform (e.g the GIC will be drived as a
> > > > > GICv1).
> > > > 
> > > > I agree with you that it is buggy firmware, but unfortunately it is
> > > > still out there, deployed. I am using a regular unmodified old Linux
> > > > kernel (4.0) which works fine (and should still work fine with modern
> > > > Xen hypervisors). I believe this DTS comes from upstream Linux 4.0.
> > > > 
> > > > The question is: should we carry this workaround to make our users' life
> > > > easier? Or should we push back the burden of fixing the firmware to the
> > > > users? There are valid arguments for both, eventually it comes down to
> > > > finding the right compromise.
> > > 
> > > In general it is better to get the newest firmware as other unrelated bugs
> > > may
> > > be present on older version or there is missing workaround for broken
> > > hardware
> > > (e.g enabling chicken bits). For instance, we have already decided to not
> > > support some version of the X-gene firmware (see commit 784c2d1 "xen/arm:
> > > Drop
> > > support of platform where GICH_LR_HW is not working correctly").
> > > 
> > > In this specific case, you assume that the GIC device tree node will
> > > always
> > > point to the beginning of the first 64K page. It might be possible in the
> > > future to have an updated firmware pointing to the last alias of the first
> > > page, so the second 4K page will follow directly.
> > 
> > Such firmware could have a version number we could check to disable
> > PLATFORM_QUIRK_GIC_64K_STRIDE.
> 
> Is there any way to retrieve the firmware version number from Xen?
> 
> Also, you mentioned later that it is possible to provide a different DTB with
> U-boot on m410. A user could decide to provide a modified one (e.g pointing to
> a different base address) and will not be possible to
> boot Xen because the quirk will screw up the base addresses.
> 
> I am wondering if you could turn on the quirk only when certain condition met
> (like a given GIC base address and the size is not 128K). This would save us
> some future trouble and that would address my concern. What do you think?

I think you are right. Concidentally the csize is 4K instead of 8K with
this DTB, we already have a workaround for that in gicv2_dt_init. I am
thinking of checking PLATFORM_QUIRK_GIC_64K_STRIDE only if the csize is
4K, which we know it is wrong. Good dtbs wouldn't be affected.

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

      reply	other threads:[~2016-11-04 20:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-25 22:46 [PATCH 0/2] Fix Xen boot on XGene Stefano Stabellini
2016-10-25 22:46 ` [PATCH 1/2] Revert "xen/arm: platform: Drop the quirks callback" Stefano Stabellini
2016-10-25 22:46   ` [PATCH 2/2] Partially revert 21550029f709072aacf3b90edd574e7d3021b400 Stefano Stabellini
2016-10-26 11:27     ` Wei Liu
2016-10-26 11:27   ` [PATCH 1/2] Revert "xen/arm: platform: Drop the quirks callback" Wei Liu
2016-10-26 17:08 ` [PATCH 0/2] Fix Xen boot on XGene Julien Grall
2016-10-26 22:12   ` Stefano Stabellini
2016-10-31 14:05     ` Julien Grall
2016-11-01 19:29       ` Stefano Stabellini
2016-11-02 10:20         ` Julien Grall
2016-11-04 20:24           ` Stefano Stabellini [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=alpine.DEB.2.10.1611041310040.19454@sstabellini-ThinkPad-X260 \
    --to=sstabellini@kernel.org \
    --cc=Steve.Capper@arm.com \
    --cc=julien.grall@arm.com \
    --cc=julien.grall@gmail.com \
    --cc=wei.liu2@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.