Re: Troubles running Xen on Raspberry Pi 4 with 5.6.1 DomU

2020-06-03 Thread Roman Shaposhnik
Well it goes without saying, but both Julian's branch and your patchset can have: Tested-by: Roman Shaposhnik Thanks, Roman. P.S. For anyone interested I'll be curating the patchset over here: https://github.com/rvs/eve/tree/rpi4/pkg/xen/arch/aarch64 https://github.com/rvs/eve/tree/rpi4

Re: Troubles running Xen on Raspberry Pi 4 with 5.6.1 DomU

2020-06-03 Thread Corey Minyard
On Wed, Jun 03, 2020 at 08:37:09AM -0700, Stefano Stabellini wrote: > On Wed, 3 Jun 2020, Corey Minyard wrote: > > On Tue, Jun 02, 2020 at 12:24:05PM -0700, Stefano Stabellini wrote: > > > On Tue, 2 Jun 2020, Corey Minyard wrote: > > > > Snip > > > > > > > > > > > > > whether > > > > > > > > > thi

Re: Troubles running Xen on Raspberry Pi 4 with 5.6.1 DomU

2020-06-03 Thread Stefano Stabellini
On Wed, 3 Jun 2020, Corey Minyard wrote: > On Tue, Jun 02, 2020 at 12:24:05PM -0700, Stefano Stabellini wrote: > > On Tue, 2 Jun 2020, Corey Minyard wrote: > > > Snip > > > > > > > > > > > whether > > > > > > > > this was already done: > > > > > > > > 1) Does the kernel boot on baremetal (i.e

Re: Troubles running Xen on Raspberry Pi 4 with 5.6.1 DomU

2020-06-03 Thread Corey Minyard
On Tue, Jun 02, 2020 at 12:24:05PM -0700, Stefano Stabellini wrote: > On Tue, 2 Jun 2020, Corey Minyard wrote: > > Snip > > > > > > > > > whether > > > > > > > this was already done: > > > > > > > 1) Does the kernel boot on baremetal (i.e without Xen)? This > > > > > > > should > > > > > > >

Re: Troubles running Xen on Raspberry Pi 4 with 5.6.1 DomU

2020-06-02 Thread Stefano Stabellini
On Tue, 2 Jun 2020, Corey Minyard wrote: > Snip > > > > > > > whether > > > > > > this was already done: > > > > > > 1) Does the kernel boot on baremetal (i.e without Xen)? This > > > > > > should > > > > > > help > > > > > > to confirm whether the bug is Xen is related. > > > > > > > > > >

Re: Troubles running Xen on Raspberry Pi 4 with 5.6.1 DomU

2020-06-02 Thread Corey Minyard
Snip > > > > > whether > > > > > this was already done: > > > > > 1) Does the kernel boot on baremetal (i.e without Xen)? This > > > > > should > > > > > help > > > > > to confirm whether the bug is Xen is related. > > > > > > > > Yes it boots > > > > > > > > > 2) Swiotlb should not b

Re: Troubles running Xen on Raspberry Pi 4 with 5.6.1 DomU

2020-05-13 Thread Stefano Stabellini
On Wed, 13 May 2020, Julien Grall wrote: > On 13/05/2020 19:19, Julien Grall wrote: > > Hi, > > > > On 13/05/2020 16:11, Stefano Stabellini wrote: > > > On Wed, 13 May 2020, Julien Grall wrote: > > > > Hi, > > > > > > > > On 13/05/2020 01:33, Stefano Stabellini wrote: > > > > > I worked with Roma

Re: Troubles running Xen on Raspberry Pi 4 with 5.6.1 DomU

2020-05-13 Thread Stefano Stabellini
On Wed, 13 May 2020, Julien Grall wrote: > On 13/05/2020 16:11, Stefano Stabellini wrote: > > On Wed, 13 May 2020, Julien Grall wrote: > > > Hi, > > > > > > On 13/05/2020 01:33, Stefano Stabellini wrote: > > > > I worked with Roman to do several more tests and here is an update on > > > > the situ

Re: Troubles running Xen on Raspberry Pi 4 with 5.6.1 DomU

2020-05-13 Thread Roman Shaposhnik
On Wed, May 13, 2020 at 11:20 AM Julien Grall wrote: > > Hi, > > On 13/05/2020 16:11, Stefano Stabellini wrote: > > On Wed, 13 May 2020, Julien Grall wrote: > >> Hi, > >> > >> On 13/05/2020 01:33, Stefano Stabellini wrote: > >>> I worked with Roman to do several more tests and here is an update on

Re: Troubles running Xen on Raspberry Pi 4 with 5.6.1 DomU

2020-05-13 Thread Julien Grall
On 13/05/2020 19:19, Julien Grall wrote: Hi, On 13/05/2020 16:11, Stefano Stabellini wrote: On Wed, 13 May 2020, Julien Grall wrote: Hi, On 13/05/2020 01:33, Stefano Stabellini wrote: I worked with Roman to do several more tests and here is an update on the situation. We don't know why my pa

Re: Troubles running Xen on Raspberry Pi 4 with 5.6.1 DomU

2020-05-13 Thread Julien Grall
Hi, On 13/05/2020 16:11, Stefano Stabellini wrote: On Wed, 13 May 2020, Julien Grall wrote: Hi, On 13/05/2020 01:33, Stefano Stabellini wrote: I worked with Roman to do several more tests and here is an update on the situation. We don't know why my patch didn't work when Boris' patch [1] work

Re: Troubles running Xen on Raspberry Pi 4 with 5.6.1 DomU

2020-05-13 Thread Stefano Stabellini
On Wed, 13 May 2020, Julien Grall wrote: > Hi, > > On 13/05/2020 01:33, Stefano Stabellini wrote: > > I worked with Roman to do several more tests and here is an update on > > the situation. We don't know why my patch didn't work when Boris' patch > > [1] worked. Both of them should have worked t

Re: Troubles running Xen on Raspberry Pi 4 with 5.6.1 DomU

2020-05-13 Thread Julien Grall
Hi, On 13/05/2020 01:33, Stefano Stabellini wrote: I worked with Roman to do several more tests and here is an update on the situation. We don't know why my patch didn't work when Boris' patch [1] worked. Both of them should have worked the same way. Anyway, we continued with Boris patch to de

Re: Troubles running Xen on Raspberry Pi 4 with 5.6.1 DomU

2020-05-06 Thread Roman Shaposhnik
On Wed, May 6, 2020 at 10:34 AM Stefano Stabellini wrote: > > On Wed, 6 May 2020, Nataliya Korovkina wrote: > > On Wed, May 6, 2020 at 9:43 AM Boris Ostrovsky > > wrote: > > > > > > > > > On 5/6/20 9:08 AM, Nataliya Korovkina wrote: > > > > Hello, > > > > > > > > What I found out: rpi_firmware_pr

Re: Troubles running Xen on Raspberry Pi 4 with 5.6.1 DomU

2020-05-06 Thread Roman Shaposhnik
On Wed, May 6, 2020 at 10:36 AM Boris Ostrovsky wrote: > > > On 5/6/20 12:14 PM, Nataliya Korovkina wrote: > > On Wed, May 6, 2020 at 9:43 AM Boris Ostrovsky > > wrote: > >> > >> On 5/6/20 9:08 AM, Nataliya Korovkina wrote: > >>> Hello, > >>> > >>> What I found out: rpi_firmware_property_list() a

Re: Troubles running Xen on Raspberry Pi 4 with 5.6.1 DomU

2020-05-06 Thread Boris Ostrovsky
On 5/6/20 12:14 PM, Nataliya Korovkina wrote: > On Wed, May 6, 2020 at 9:43 AM Boris Ostrovsky > wrote: >> >> On 5/6/20 9:08 AM, Nataliya Korovkina wrote: >>> Hello, >>> >>> What I found out: rpi_firmware_property_list() allocates memory from >>> dma_atomic_pool which was mapped to VMALLOC regio

Re: Troubles running Xen on Raspberry Pi 4 with 5.6.1 DomU

2020-05-06 Thread Stefano Stabellini
On Wed, 6 May 2020, Nataliya Korovkina wrote: > On Wed, May 6, 2020 at 9:43 AM Boris Ostrovsky > wrote: > > > > > > On 5/6/20 9:08 AM, Nataliya Korovkina wrote: > > > Hello, > > > > > > What I found out: rpi_firmware_property_list() allocates memory from > > > dma_atomic_pool which was mapped to V

Re: Troubles running Xen on Raspberry Pi 4 with 5.6.1 DomU

2020-05-06 Thread Stefano Stabellini
On Wed, 6 May 2020, Jürgen Groß wrote: > On 06.05.20 00:34, Stefano Stabellini wrote: > > + Boris, Jürgen > > > > See the crash Roman is seeing booting dom0 on the Raspberry Pi. It is > > related to the recent xen dma_ops changes. Possibly the same thing > > reported by Peng here: > > > > https:/

RE: Troubles running Xen on Raspberry Pi 4 with 5.6.1 DomU

2020-05-06 Thread Stefano Stabellini
On Wed, 6 May 2020, Peng Fan wrote: > > Subject: Re: Troubles running Xen on Raspberry Pi 4 with 5.6.1 DomU > > > > On 06.05.20 00:34, Stefano Stabellini wrote: > > > + Boris, Jürgen > > > > > > See the crash Roman is seeing booting dom0 on the Raspbe

Re: Troubles running Xen on Raspberry Pi 4 with 5.6.1 DomU

2020-05-06 Thread Nataliya Korovkina
On Wed, May 6, 2020 at 9:43 AM Boris Ostrovsky wrote: > > > On 5/6/20 9:08 AM, Nataliya Korovkina wrote: > > Hello, > > > > What I found out: rpi_firmware_property_list() allocates memory from > > dma_atomic_pool which was mapped to VMALLOC region, so virt_to_page() > > is not eligible in this cas

Re: Troubles running Xen on Raspberry Pi 4 with 5.6.1 DomU

2020-05-06 Thread Julien Grall
Hi, On 06/05/2020 14:48, Corey Minyard wrote: On Sat, May 02, 2020 at 12:46:14PM +0100, Julien Grall wrote: Hi, On 02/05/2020 03:16, Corey Minyard wrote: On Fri, May 01, 2020 at 06:06:11PM -0700, Roman Shaposhnik wrote: On Fri, May 1, 2020 at 4:42 AM Corey Minyard wrote: On Thu, Apr 30, 2

Re: Troubles running Xen on Raspberry Pi 4 with 5.6.1 DomU

2020-05-06 Thread Corey Minyard
On Sat, May 02, 2020 at 12:46:14PM +0100, Julien Grall wrote: > Hi, > > On 02/05/2020 03:16, Corey Minyard wrote: > > On Fri, May 01, 2020 at 06:06:11PM -0700, Roman Shaposhnik wrote: > > > On Fri, May 1, 2020 at 4:42 AM Corey Minyard wrote: > > > > > > > > On Thu, Apr 30, 2020 at 07:20:05PM -07

Re: Troubles running Xen on Raspberry Pi 4 with 5.6.1 DomU

2020-05-06 Thread Boris Ostrovsky
On 5/6/20 9:08 AM, Nataliya Korovkina wrote: > Hello, > > What I found out: rpi_firmware_property_list() allocates memory from > dma_atomic_pool which was mapped to VMALLOC region, so virt_to_page() > is not eligible in this case. So then it seems it didn't go through xen_swiotlb_alloc_coherent

Re: Troubles running Xen on Raspberry Pi 4 with 5.6.1 DomU

2020-05-06 Thread Nataliya Korovkina
Hello, What I found out: rpi_firmware_property_list() allocates memory from dma_atomic_pool which was mapped to VMALLOC region, so virt_to_page() is not eligible in this case. Thanks, Nataliya On Wed, May 6, 2020 at 4:57 AM Peng Fan wrote: > > > Subject: Re: Troubles running Xen on

RE: Troubles running Xen on Raspberry Pi 4 with 5.6.1 DomU

2020-05-06 Thread Peng Fan
> Subject: Re: Troubles running Xen on Raspberry Pi 4 with 5.6.1 DomU > > On 06.05.20 00:34, Stefano Stabellini wrote: > > + Boris, Jürgen > > > > See the crash Roman is seeing booting dom0 on the Raspberry Pi. It is > > related to the recent xen dma_ops

Re: Troubles running Xen on Raspberry Pi 4 with 5.6.1 DomU

2020-05-05 Thread Jürgen Groß
On 06.05.20 00:34, Stefano Stabellini wrote: + Boris, Jürgen See the crash Roman is seeing booting dom0 on the Raspberry Pi. It is related to the recent xen dma_ops changes. Possibly the same thing reported by Peng here: https://marc.info/?l=linux-kernel&m=158805976230485&w=2 An in-depth analy

Re: Troubles running Xen on Raspberry Pi 4 with 5.6.1 DomU

2020-05-05 Thread Roman Shaposhnik
On Tue, May 5, 2020 at 3:34 PM Stefano Stabellini wrote: > > + Boris, Jürgen > > See the crash Roman is seeing booting dom0 on the Raspberry Pi. It is > related to the recent xen dma_ops changes. Possibly the same thing > reported by Peng here: > > https://marc.info/?l=linux-kernel&m=1588059762304

Re: Troubles running Xen on Raspberry Pi 4 with 5.6.1 DomU

2020-05-05 Thread Boris Ostrovsky
On 5/5/20 6:34 PM, Stefano Stabellini wrote: > > > The crash happens here: > > if (!WARN_ON((dev_addr + size - 1 > dma_mask) || >range_straddles_page_boundary(phys, size)) && > TestClearPageXenRemapped(virt_to_page(vaddr))) > xen_destroy_contigu

Re: Troubles running Xen on Raspberry Pi 4 with 5.6.1 DomU

2020-05-05 Thread Stefano Stabellini
+ Boris, Jürgen See the crash Roman is seeing booting dom0 on the Raspberry Pi. It is related to the recent xen dma_ops changes. Possibly the same thing reported by Peng here: https://marc.info/?l=linux-kernel&m=158805976230485&w=2 An in-depth analysis below. On Mon, 4 May 2020, Roman Shaposhn

Re: Troubles running Xen on Raspberry Pi 4 with 5.6.1 DomU

2020-05-04 Thread Roman Shaposhnik
On Mon, May 4, 2020 at 8:52 PM Stefano Stabellini wrote: > > On Mon, 4 May 2020, Roman Shaposhnik wrote: > > Hi Julien, > > > > thank for your patch -- just like Corey I tried it out and it seems to > > work fine and gets > > me further. At this point, I'm pretty sure I'm past initial > > bootstra

Re: Troubles running Xen on Raspberry Pi 4 with 5.6.1 DomU

2020-05-04 Thread Stefano Stabellini
On Mon, 4 May 2020, Roman Shaposhnik wrote: > Hi Julien, > > thank for your patch -- just like Corey I tried it out and it seems to > work fine and gets > me further. At this point, I'm pretty sure I'm past initial > bootstrapping issues and into > what can be basically described as Xen DMA issue

Re: Troubles running Xen on Raspberry Pi 4 with 5.6.1 DomU

2020-05-04 Thread Roman Shaposhnik
Hi Julien, thank for your patch -- just like Corey I tried it out and it seems to work fine and gets me further. At this point, I'm pretty sure I'm past initial bootstrapping issues and into what can be basically described as Xen DMA issue of some kind (so I'm pretty sure I will need Stefano's hel

Re: Troubles running Xen on Raspberry Pi 4 with 5.6.1 DomU

2020-05-04 Thread Corey Minyard
On Sat, May 02, 2020 at 06:48:27PM +0100, Julien Grall wrote: > > > On 02/05/2020 18:35, Corey Minyard wrote: > > On Sat, May 02, 2020 at 12:46:14PM +0100, Julien Grall wrote: > > No. If I am understanding this correctly, all the memory in dom0 below > > 1GB would have to be physically below 1GB

Re: Troubles running Xen on Raspberry Pi 4 with 5.6.1 DomU

2020-05-02 Thread Julien Grall
Hi Elliott, On 02/05/2020 19:48, Elliott Mitchell wrote: On Sat, May 02, 2020 at 12:35:29PM -0500, Corey Minyard wrote: On Sat, May 02, 2020 at 12:46:14PM +0100, Julien Grall wrote: On 02/05/2020 03:16, Corey Minyard wrote: Nope. If you say 4096M of RAM, your issue is almost certainly DMA,

Re: Troubles running Xen on Raspberry Pi 4 with 5.6.1 DomU

2020-05-02 Thread Elliott Mitchell
On Sat, May 02, 2020 at 12:35:29PM -0500, Corey Minyard wrote: > On Sat, May 02, 2020 at 12:46:14PM +0100, Julien Grall wrote: > > > > On 02/05/2020 03:16, Corey Minyard wrote: > > > > > > Nope. If you say 4096M of RAM, your issue is almost certainly DMA, but > > > it's not (just) the Linux code

Re: Troubles running Xen on Raspberry Pi 4 with 5.6.1 DomU

2020-05-02 Thread Julien Grall
On 02/05/2020 18:35, Corey Minyard wrote: On Sat, May 02, 2020 at 12:46:14PM +0100, Julien Grall wrote: No. If I am understanding this correctly, all the memory in dom0 below 1GB would have to be physically below 1GB. Well, dom0 is directly mapped. In other word, dom0 physical address == h

Re: Troubles running Xen on Raspberry Pi 4 with 5.6.1 DomU

2020-05-02 Thread Corey Minyard
On Sat, May 02, 2020 at 12:46:14PM +0100, Julien Grall wrote: > Hi, > > On 02/05/2020 03:16, Corey Minyard wrote: > > On Fri, May 01, 2020 at 06:06:11PM -0700, Roman Shaposhnik wrote: > > > On Fri, May 1, 2020 at 4:42 AM Corey Minyard wrote: > > > > > > > > On Thu, Apr 30, 2020 at 07:20:05PM -07

Re: Troubles running Xen on Raspberry Pi 4 with 5.6.1 DomU

2020-05-02 Thread Julien Grall
Hi, On 02/05/2020 03:16, Corey Minyard wrote: On Fri, May 01, 2020 at 06:06:11PM -0700, Roman Shaposhnik wrote: On Fri, May 1, 2020 at 4:42 AM Corey Minyard wrote: On Thu, Apr 30, 2020 at 07:20:05PM -0700, Roman Shaposhnik wrote: Hi! I'm trying to run Xen on Raspberry Pi 4 with 5.6.1 stock

Re: Troubles running Xen on Raspberry Pi 4 with 5.6.1 DomU

2020-05-01 Thread Corey Minyard
On Fri, May 01, 2020 at 06:06:11PM -0700, Roman Shaposhnik wrote: > On Fri, May 1, 2020 at 4:42 AM Corey Minyard wrote: > > > > On Thu, Apr 30, 2020 at 07:20:05PM -0700, Roman Shaposhnik wrote: > > > Hi! > > > > > > I'm trying to run Xen on Raspberry Pi 4 with 5.6.1 stock, > > > upstream kernel. T

Re: Troubles running Xen on Raspberry Pi 4 with 5.6.1 DomU

2020-05-01 Thread Roman Shaposhnik
Hi Stefano! On Fri, May 1, 2020 at 5:05 PM Stefano Stabellini wrote: > > Hi Roman, > > > In regards to the attached stack trace, nothing rings a bell > unfortunately. I don't know why quirk_usb_early_handoff causes a crash. > It would be useful to add a few printk in quirk_usb_early_handoff to >

Re: Troubles running Xen on Raspberry Pi 4 with 5.6.1 DomU

2020-05-01 Thread Roman Shaposhnik
On Fri, May 1, 2020 at 4:42 AM Corey Minyard wrote: > > On Thu, Apr 30, 2020 at 07:20:05PM -0700, Roman Shaposhnik wrote: > > Hi! > > > > I'm trying to run Xen on Raspberry Pi 4 with 5.6.1 stock, > > upstream kernel. The kernel itself works perfectly well > > on the board. When I try booting it as

Re: Troubles running Xen on Raspberry Pi 4 with 5.6.1 DomU

2020-05-01 Thread Stefano Stabellini
Hi Roman, In regards to the attached stack trace, nothing rings a bell unfortunately. I don't know why quirk_usb_early_handoff causes a crash. It would be useful to add a few printk in quirk_usb_early_handoff to know where the crash is happening exactly. In regards to Dornerworks's third patch,

Re: Troubles running Xen on Raspberry Pi 4 with 5.6.1 DomU

2020-05-01 Thread Corey Minyard
On Thu, Apr 30, 2020 at 07:20:05PM -0700, Roman Shaposhnik wrote: > Hi! > > I'm trying to run Xen on Raspberry Pi 4 with 5.6.1 stock, > upstream kernel. The kernel itself works perfectly well > on the board. When I try booting it as Dom0 under Xen, > it goes into a stacktrace (attached). Getting