All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Stabellini <sstabellini@kernel.org>
To: Roman Shaposhnik <roman@zededa.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>,
	Julien Grall <julien@xen.org>,
	minyard@acm.org, jeff.kubascik@dornerworks.com,
	Julien Grall <julien.grall@arm.com>,
	xen-devel@lists.xenproject.org,
	Stefano Stabellini <stefano.stabellini@xilinx.com>
Subject: Re: Troubles running Xen on Raspberry Pi 4 with 5.6.1 DomU
Date: Fri, 1 May 2020 17:05:09 -0700 (PDT)	[thread overview]
Message-ID: <alpine.DEB.2.21.2005011637380.28941@sstabellini-ThinkPad-T480s> (raw)
In-Reply-To: <CAMmSBy_A4xJmCo-PiWukv0+vkEhXXDpYwZAKAiJ=mmpuY1CbMA@mail.gmail.com>

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, it doesn't look like it is
related to the quirk_usb_early_handoff crash. The third patch is
probably not useful anymore because dev->archdata.dev_dma_ops is gone
completely. However, just in case, something like the following would
help recognize if the original bug still persists in newer kernels
somehow:


diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c
index 6c45350e33aa..61af12d79add 100644
--- a/arch/arm64/mm/dma-mapping.c
+++ b/arch/arm64/mm/dma-mapping.c
@@ -53,7 +53,9 @@ void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size,
 		iommu_setup_dma_ops(dev, dma_base, size);
 
 #ifdef CONFIG_XEN
-	if (xen_initial_domain())
+	if (xen_initial_domain()) {
+		WARN_ON(dev->dma_ops != NULL);
 		dev->dma_ops = &xen_swiotlb_dma_ops;
+	}
 #endif
 }


On Thu, 30 Apr 2020, 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).
> 
> Looking at what nice folks over at Dornerworks have previously
> done to make RPi kernels boot as Dom0 I've come across these
> 3 patches:
>     https://github.com/dornerworks/xen-rpi4-builder/tree/master/patches/linux
> 
> The first patch seems irrelevant (unless I'm missing something
> really basic here). The 2nd patch applied with no issue (but
> I don't think it is related) but the 3d patch failed to apply on
> account of 5.6.1 kernel no longer having:
>     dev->archdata.dev_dma_ops
> E.g.
>     https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/arch/arm64/mm/dma-mapping.c?h=v5.6.1#n55
> 
> I've tried to emulate the effect of the patch by simply introducing
> a static variable that would signal that we already initialized
> dev->dma_ops -- but that didn't help at all.
> 
> I'm CCing Jeff Kubascik to see if the original authors of that Corey Minyard
> to see if may be they have any suggestions on how this may be dealt
> with.
> 
> Any advice would be greatly appreciated!
> 
> Thanks,
> Roman.
> 


  parent reply	other threads:[~2020-05-02  0:05 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-01  2:20 Troubles running Xen on Raspberry Pi 4 with 5.6.1 DomU Roman Shaposhnik
2020-05-01 11:42 ` Corey Minyard
2020-05-02  1:06   ` Roman Shaposhnik
2020-05-02  2:16     ` Corey Minyard
2020-05-02 11:46       ` Julien Grall
2020-05-02 17:35         ` Corey Minyard
2020-05-02 17:48           ` Julien Grall
2020-05-04 12:44             ` Corey Minyard
2020-05-04 20:54               ` Roman Shaposhnik
2020-05-05  3:52                 ` Stefano Stabellini
2020-05-05  5:36                   ` Roman Shaposhnik
2020-05-05 22:34                     ` Stefano Stabellini
2020-05-06  1:25                       ` Boris Ostrovsky
2020-05-06  4:19                       ` Roman Shaposhnik
2020-05-06  5:41                       ` Jürgen Groß
2020-05-06  8:54                         ` Peng Fan
2020-05-06 13:08                           ` Nataliya Korovkina
2020-05-06 13:42                             ` Boris Ostrovsky
2020-05-06 16:14                               ` Nataliya Korovkina
2020-05-06 17:34                                 ` Stefano Stabellini
2020-05-06 21:12                                   ` Roman Shaposhnik
2020-05-13  0:33                                     ` Stefano Stabellini
2020-05-13 10:11                                       ` Julien Grall
2020-05-13 15:11                                         ` Stefano Stabellini
2020-05-13 18:19                                           ` Julien Grall
2020-05-13 18:26                                             ` Julien Grall
2020-05-13 19:51                                               ` Stefano Stabellini
2020-06-02 18:34                                                 ` Corey Minyard
2020-06-02 19:24                                                   ` Stefano Stabellini
2020-06-03 15:29                                                     ` Corey Minyard
2020-06-03 15:37                                                       ` Stefano Stabellini
2020-06-03 19:49                                                         ` Corey Minyard
2020-06-03 19:55                                                         ` Roman Shaposhnik
2020-05-13 19:13                                             ` Roman Shaposhnik
2020-05-13 19:49                                             ` Stefano Stabellini
2020-05-06 17:35                                 ` Boris Ostrovsky
2020-05-06 21:10                                   ` Roman Shaposhnik
2020-05-06 17:16                           ` Stefano Stabellini
2020-05-06 17:32                         ` Stefano Stabellini
2020-05-02 18:48           ` Elliott Mitchell
2020-05-02 19:43             ` Julien Grall
2020-05-06 13:48         ` Corey Minyard
2020-05-06 13:56           ` Julien Grall
2020-05-02  0:05 ` Stefano Stabellini [this message]
2020-05-02  1:12   ` Roman Shaposhnik

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.21.2005011637380.28941@sstabellini-ThinkPad-T480s \
    --to=sstabellini@kernel.org \
    --cc=jeff.kubascik@dornerworks.com \
    --cc=julien.grall@arm.com \
    --cc=julien@xen.org \
    --cc=minyard@acm.org \
    --cc=roman@zededa.com \
    --cc=stefano.stabellini@xilinx.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.