[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AW: AW: AW: AW: AW: AW: Xen data from meta-virtualization layer


  • To: Julien Grall <julien@xxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxxxxx>
  • From: Leo Krueger <leo.krueger@xxxxxxxx>
  • Date: Tue, 24 Nov 2020 23:11:25 +0000
  • Accept-language: de-DE, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=zal.aero; dmarc=pass action=none header.from=zal.aero; dkim=pass header.d=zal.aero; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=53yoF7REm0yX67XQYQQYlljxEs1Kcsrjjfn40UG8xxw=; b=drrHy4cYnGW/yyeFCtaR7iIxLzzPW3pCWLRa0gvGxikSssNac0BocV+FKzbTrzVDQAJiFgLygUBAdNNEN1enq8fM2RHBLz0XHoYBzIuNoEPYhTWip1TgDmrN1BUAMAPgXQwZYeAmNdImI5N4T2F5i9UrKLqzFTUkwPcuuiTsqy5uGDlZ4sFrviB50vitL9LZh833TL0h/WG3XVAfA4I6qOmAOGEKSW80D65SgHFXoG3k0Dx9cItr83PH+WkGPz8ja9bHz4R9j5ZZNoI1zuJps2J942v16uRoP1aC8hM69GzL0l0MgvDsbJKeQkvpjDPxagsvJl6B/vq6WLZSariWqw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ipjQMG1ElQ+k2eduAFpzUaP8GR2tK8zl0mnPUtrrjKa1Ox0PnImAepe8e3lqxUqSIfpK1o4daF5eyxRNI/SZ3fzIcHN0gw87WeV99j0H0mHRuI1g46lxiU8ISV0CxuN3KzENA9/e+lIRBJOh3ercC38DWpwf40Tytqn8lQfgfP4inc/ooyru7FhPDMN9ph6PQaIlKS8bYXI8xOj7GkOpwG/PnLee3vIxfVaYNim913RHLD1SMi8okqbz52dJlTFPMIT7H4WAU4KXpTG1t/wzNRkDBCREe5JaxltD0BKfwq2swRN/EIcrtzGUDe77dHMuAPPp210qPGEyJqEzX6z2uA==
  • Authentication-results: xen.org; dkim=none (message not signed) header.d=none;xen.org; dmarc=none action=none header.from=zal.aero;
  • Cc: Peng Fan <peng.fan@xxxxxxx>, "brucea@xxxxxxxxxx" <brucea@xxxxxxxxxx>, Cornelia Bruelhart <cornelia.bruelhart@xxxxxxxx>, "oleksandr_andrushchenko@xxxxxxxx" <oleksandr_andrushchenko@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "Bertrand.Marquis@xxxxxxx" <Bertrand.Marquis@xxxxxxx>
  • Delivery-date: Tue, 24 Nov 2020 23:11:57 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AdaxGoYJbW1LEL/jTUmK3sZDIRyPGAA9xNCAASdllGAAABZN8AAYnVUAACWhGAAAC0bcAAAAU02AAAYKpqgABBfLAADlnDFgADm6ywAAK1PyQAAEq7SAABo3VQAA3unxYAApO/qAADv7W5A=
  • Thread-topic: AW: AW: AW: AW: AW: Xen data from meta-virtualization layer

Hi,

> -----Ursprüngliche Nachricht-----
> Von: Julien Grall <julien@xxxxxxx>
> Gesendet: Montag, 23. November 2020 19:27
> An: Leo Krueger <leo.krueger@xxxxxxxx>; Stefano Stabellini
> <stefano.stabellini@xxxxxxxxxx>
> Cc: Peng Fan <peng.fan@xxxxxxx>; brucea@xxxxxxxxxx; Cornelia Bruelhart
> <cornelia.bruelhart@xxxxxxxx>; oleksandr_andrushchenko@xxxxxxxx; xen-
> devel@xxxxxxxxxxxxxxxxxxxx; Bertrand.Marquis@xxxxxxx
> Betreff: Re: AW: AW: AW: AW: AW: Xen data from meta-virtualization layer
> 
> 
> 
> On 22/11/2020 22:55, Leo Krueger wrote:
> > Hi Julien,
> 
> Hi Leo,
> 
> >
> > finally I could try out what you suggested, please find my answers inline.
> 
> Thank you for sending the logs!
> 
> >
> >> -----Ursprüngliche Nachricht-----
> >> Von: Julien Grall <julien@xxxxxxx>
> >> Gesendet: Mittwoch, 18. November 2020 13:24
> >> An: Stefano Stabellini <stefano.stabellini@xxxxxxxxxx>; Leo Krueger
> >> <leo.krueger@xxxxxxxx>
> >> Cc: Peng Fan <peng.fan@xxxxxxx>; brucea@xxxxxxxxxx; Cornelia
> >> Bruelhart <cornelia.bruelhart@xxxxxxxx>;
> >> oleksandr_andrushchenko@xxxxxxxx; xen- devel@xxxxxxxxxxxxxxxxxxxx;
> >> Bertrand.Marquis@xxxxxxx
> >> Betreff: Re: AW: AW: AW: AW: Xen data from meta-virtualization layer
> >>
> >> Hi,
> >>
> >> On 17/11/2020 23:53, Stefano Stabellini wrote:
> >>> Adding Bertrand, Oleksandr, Julien, and others -- they have a more
> >>> recent experience with GICv3 ITS than me and might be able to help.
> >>> I am attaching the device tree Leo sent a few days ago for reference.
> >>>
> >>>
> >>> Typically when you can set the ethernet link up and no packets are
> >>> exchanged it is because of a missing interrupt. In this case a
> >>> missing MSI.
> >>>
> >>> Bertrand, I believe you tried the GIC ITS driver with PCI devices
> >>> recently. It is expected to work correctly with MSIs in Dom0, right?
> >>
> >> OSSTest has some hardware (e.g. Thunder-X) where ITS is required to
> >> boot Dom0. I haven't seen any failure on recent Xen. We are testing
> >> 4.11 and onwards on Thunder-X.
> >>
> >> However, it may be possible that some more work is necessary for
> >> other hardware (e.g. workaround, missing code...). See more below.
> >>
> >>>
> >>>
> >>>
> >>> On Tue, 17 Nov 2020, Leo Krueger wrote:
> >>>> Hi,
> >>>>
> >>>> I enabled CONFIG_HAS_ITS (what a stupid mistake by me to not set it
> >>>> before...) but then had to add the following node to my device tree
> >>>>
> >>>>  gic_lpi_base: syscon@0x80000000 {
> >>>>          compatible = "gic-lpi-base";
> >>
> >> I couldn't find this compatible defined/used in Linux 5.10-rc4. @Leo,
> >> could you clarify which flavor/version of Linux you are using?
> >
> > It is Linux 4.19 from Yocto (Warror release). XEN 4.13.2.
> 
> Do you have a link to the Linux tree? Is there any additional patches on top 
> of
> vanilla?

Linux tree is found here: 
https://github.com/kontron/linux-smarc-sal28/commits/master-LSDK-19.09
(up to the latest commit in that branch)

> 
> > While searching around the Internet for any solution, I came across [0]
> which contained the gic-lpi-base node.
> > So I just tried adding it (quite desperate I know) and voila, it at least
> brought me one step further (XEN exposing the ITS)...
> 
> I am slightly confused to how this would help. Xen and, AFAICT, Linux don't
> understand gic-lpi-base. Do you have modification in your Linux to use it?

I have no idea, to be honest. Maybe it is about the memory being reserved due 
to that node or something like that?

> 
> Looking at the DT changes in [0], it looks like the node is not a child of 
> gic@.
> So I think Xen will map the region to Dom0.
> 
> There are two things that I can notice:
>    1) This region is RAM, but I can't find any reserve node. Is there any 
> specific
> code in Linux to reserve it?
>    2) The implementation in U-boot seems to suggest that the firmware will
> configure the LPIs and then enable it. If that's the case, then Xen needs to
> re-use the table in the DT rather than allocating a new one.
> However, I would have expected an error message in the log:
> 
>     "GICv3: CPUx: Cannot initialize LPIs"
> 
> At least Xen should not expose gic-lpi-base to the kernel, but I will wait on
> more details about the Linux kernel used before commenting more.
> 
> I would also be interested to know more details about the failure when gic-
> lpi-base is not added in your DT. In particular, I am interested to understand
> why Xen would not expose the ITS as we don't parse that node.

How can I supply you with more information in regard to that? Without that 
node, ITS was not exposed at all.

> 
> [...]
> 
> > For XEN 4.13.2 I had to adapt your patch slightly [1], see below (yes I 
> > know,
> quite ugly in parts).
> 
> No worries, debug patches are not meant to be nice to read ;).
> 
> > Find attached the boot log and an output of "xl dmesg" which is truncated
> due to the large amount of messages.
> >
> > When enabling the network interface (gbe0), the following output is
> visible:
> >
> > root@kontron-sal28:~# ip link set up dev gbe0
> > (XEN) vgic-v3-its.c:902:d0v0 vITS  cmd 0x0c: 000000170000000c
> > 0000000000000001 0000000000000000 0000000000000000
> > (XEN) vgic-v3-its.c:902:d0v0 vITS  cmd 0x05: 0000000000000005
> > 0000000000000000 0000000000000000 0000000000000000
> 
> 0xc is INV and 0x5 is SYNC. Most likely the driver unmask the interrupt by
> writing in the property table (access are not trapped to Xen) and then
> requested to invalidate the cache state.
> 
> > [   34.034598] Atheros 8031 ethernet 0000:00:00.3:05: attached PHY driver
> [Atheros 8031 ethernet] (mii_bus:phy_addr=0000:00:00.3:05, irq=POLL)
> > [   34.041111] 8021q: adding VLAN 0 to HW filter on device gbe0
> > [   34.041209] IPv6: ADDRCONF(NETDEV_UP): gbe0: link is not ready
> > root@kontron-sal28:~# [   35.041951] fsl_enetc 0000:00:00.0 gbe0: Link is
> Down
> > [   38.114426] fsl_enetc 0000:00:00.0 gbe0: Link is Up - 1Gbps/Full - flow
> control off
> > [   38.114508] IPv6: ADDRCONF(NETDEV_CHANGE): gbe0: link becomes
> ready
> >
> > Does that tell you anything?
> 
> It is at least a good sign because it means Linux is able to initialize/talk 
> to the
> vITS.
> 
> I would lean towards one (or multiple) issue with pITS and/or the device-tree
> exposed to Linux. I am not entirely what exactly... I think having more 
> details
> about the Linux setup would be helpful.

Ok let me know what you need from my side. I was considering the following 
things to try out next:

- a more recent u-boot version as this might fix problems with the msi-map (at 
least that is what I think, I am not an expert here)
- a different device tree (a more recent one, ...)
- ...

> 
> I will reply on Rahul's e-mail separately.
> 
> Cheers,

Best wishes!

> 
> --
> Julien Grall

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.