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

Re: Question about xen and Rasp 4B

On Sat, 23 Jan 2021 at 00:27, Stefano Stabellini <sstabellini@xxxxxxxxxx> wrote:
> + xen-devel, Roman,
> On Fri, 22 Jan 2021, Jukka Kaartinen wrote:
> > Hi Stefano,
> > I'm Jukka Kaartinen a SW developer working on enabling hypervisors on 
> > mobile platforms. One of our HW that we use on development is
> > Raspberry Pi 4B. I wonder if you could help me a bit :).
> >
> > I'm trying to enable the GPU with Xen + Raspberry Pi for dom0. 
> > https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=232323#p1797605
> >
> > I got so far that GPU drivers are loaded (v3d & vc4) without errors. But 
> > now Xen returns error when X is starting:
> > (XEN) traps.c:1986:d0v1 HSR=0x93880045 pc=0x00007f97b14e70 gva=0x7f7f817000 
> > gpa=0x0000401315d000
> >  I tried to debug what causes this and looks like find_mmio_handler cannot 
> > find handler.
> > (See more here: 
> > https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=232323&start=25#p1801691
> >  )
> >
> > Any ideas why the handler is not found?
> Hi Jukka,
> I am glad to hear that you are interested in Xen on RaspberryPi :-)  I
> haven't tried the GPU yet, I have been using the serial only.
> Roman, did you ever get the GPU working?
> The error is a data abort error: Linux is trying to access an address
> which is not mapped to dom0. The address seems to be 0x401315d000. It is
> a pretty high address; I looked in device tree but couldn't spot it.
> From the HSR (the syndrom register) it looks like it is a translation
> fault at EL1 on stage1.

Hmmm.... We don't trap stage 1 faults to Xen, instead they are
received by the OS directly.

In fact the ESR_El1, indicates that it is a translation fault at level
1 when walking the stage-2 page-table. So it means the guest physical
address is not mapped in the P2M. But...

> As if the Linux address mapping was wrong.

... I think the GPA is bogus. So I agree Linux may have configured the
stage-1 page-tables incorrectly.

> Anyone has any ideas how this could happen? Maybe a reserved-memory
> misconfiguration?

It looks like to me both the PC and the GVA points to user memory.
Normally, Xen will inject a data abort into Linux and will usually
dump some information (e.g. the task running).

@Jukka, would it be possible to provide the console out for both Xen and Linux?

Would you also be able to confirm if the same setup is working when
Linux is running directly on the HW? This would give us an idea
whether the issue is specific to Xen.




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