From: Julien Grall <julien@xen.org>
To: Srinivas Bangalore <srini@yujala.com>,
xen-devel@lists.xenproject.org,
Christopher Clark <christopher.w.clark@gmail.com>
Subject: Re: Porting Xen to Jetson Nano
Date: Thu, 23 Jul 2020 19:04:23 +0100 [thread overview]
Message-ID: <9736680b-1c81-652b-552b-4103341bad50@xen.org> (raw)
In-Reply-To: <002801d66051$90fe2300$b2fa6900$@yujala.com>
On 22/07/2020 18:57, Srinivas Bangalore wrote:
> Dear Xen experts,
Hello,
> Would greatly appreciate some hints on how to move forward with this one…
From your first set of original log:
> Xen version 4.8.5 (srinivas@) (aarch64-linux-gnu-gcc
> (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) 7.5.0) debug=n Sun Jul 19 07:44:00
> PDT 2020
I would recommend to compile Xen with debug enabled (CONFIG_DEBUG=y) as
it may provide you more information of what's happening.
Also, aside the Tegra series. Do you have any other patches on top?
[...]
> (XEN) BANK[0] 0x000000a0000000-0x000000c0000000 (512MB)
>
> (XEN) Grant table range: 0x000000fec00000-0x000000fec60000
>
> (XEN) Loading zImage from 00000000e1000000 to
> 00000000a0080000-00000000a223c808
>
> (XEN) Allocating PPI 16 for event channel interrupt
>
> (XEN) Loading dom0 DTB to 0x00000000a8000000-0x00000000a803435c
[...]
>
> (XEN) *** Dumping CPU0 guest state (d0v0): ***
>
> (XEN) ----[ Xen-4.8.5 arm64 debug=n Tainted: C ]----
>
> (XEN) CPU: 0
>
> (XEN) PC: 00000000a0080000
PC is pointing to the entry point of your kernel...
>
> (XEN) LR: 0000000000000000
>
> (XEN) SP_EL0: 0000000000000000
>
> (XEN) SP_EL1: 0000000000000000
>
> (XEN) CPSR: 000001c5 MODE:64-bit EL1h (Guest Kernel, handler)
>
> (XEN) X0: 00000000a8000000 X1: 0000000000000000 X2: 0000000000000000
>
> (XEN) X3: 0000000000000000 X4: 0000000000000000 X5: 0000000000000000
>
> (XEN) X6: 0000000000000000 X7: 0000000000000000 X8: 0000000000000000
>
> (XEN) X9: 0000000000000000 X10: 0000000000000000 X11: 0000000000000000
>
> (XEN) X12: 0000000000000000 X13: 0000000000000000 X14: 0000000000000000
>
> (XEN) X15: 0000000000000000 X16: 0000000000000000 X17: 0000000000000000
>
> (XEN) X18: 0000000000000000 X19: 0000000000000000 X20: 0000000000000000
>
> (XEN) X21: 0000000000000000 X22: 0000000000000000 X23: 0000000000000000
>
> (XEN) X24: 0000000000000000 X25: 0000000000000000 X26: 0000000000000000
>
> (XEN) X27: 0000000000000000 X28: 0000000000000000 FP: 0000000000000000
>
> (XEN)
>
> (XEN) ELR_EL1: 0000000000000000
>
> (XEN) ESR_EL1: 00000000
>
> (XEN) FAR_EL1: 0000000000000000
>
> (XEN)
>
> (XEN) SCTLR_EL1: 00c50838
>
> (XEN) TCR_EL1: 00000000
>
> (XEN) TTBR0_EL1: 0000000000000000
>
> (XEN) TTBR1_EL1: 0000000000000000
>
> (XEN)
>
> (XEN) VTCR_EL2: 80043594
>
> (XEN) VTTBR_EL2: 000100017f0f9000
>
> (XEN)
>
> (XEN) SCTLR_EL2: 30cd183d
>
> (XEN) HCR_EL2: 000000008038663f
>
> (XEN) TTBR0_EL2: 00000000fecfc000
>
> (XEN)
>
> (XEN) ESR_EL2: 8200000d
... it looks like we are receiving a trap in EL2 because it can't
execute the instruction. This is a bit odd as the p2m (stage-2
page-tables) should be configured to allow execution. It would be useful
if you can dump the p2m walk here. This following patch should do the
job (not compiled test):
diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c
index d578a5c598dd..af1834cdf735 100644
--- a/xen/arch/arm/traps.c
+++ b/xen/arch/arm/traps.c
@@ -2489,9 +2489,14 @@ static void do_trap_instr_abort_guest(struct
cpu_user_regs *regs,
*/
rc = gva_to_ipa(gva, &gpa, GV2M_READ);
if ( rc == -EFAULT )
+ {
+ printk("Unable to translate 0x%lx\n", gva);
return; /* Try again */
+ }
}
+ dump_p2m_walk(current->domain, gpa);
+
switch ( fsc )
{
case FSC_FLT_PERM:
>
> (XEN) HPFAR_EL2: 0000000000000000
>
> (XEN) FAR_EL2: 00000000a0080000
>
> (XEN)
>
> (XEN) Guest stack trace from sp=0:
>
> (XEN) Failed to convert stack to physical address
[...]
> It seems the DOM0 kernel did not get added to the task list….
From a look at the dump, dom0 vCPU0 has been scheduled and running on
pCPU0.
>
> Boot args for Xen and Dom0 are here:
> (XEN) Checking for initrd in /chosen
>
> (XEN) linux,initrd limits invalid: 0000000084100000 >= 0000000084100000
>
> (XEN) RAM: 0000000080000000 - 00000000fedfffff
>
> (XEN) RAM: 0000000100000000 - 000000017f1fffff
>
> (XEN)
>
> (XEN) MODULE[0]: 00000000fc7f8000 - 00000000fc82d000 Device Tree
>
> (XEN) MODULE[1]: 00000000e1000000 - 00000000e31bc808 Kernel
> console=hvc0 earlyprintk=xen earlycon=xen rootfstype=ext4 rw rootwait
> root=/dev/mmcblk0p1 rdinit=/sbin/init
You want to use earlycon=xenboot here.
>
> (XEN) RESVD[0]: 0000000080000000 - 0000000080020000
>
> (XEN) RESVD[1]: 00000000e3500000 - 00000000e3535000
>
> (XEN) RESVD[2]: 00000000fc7f8000 - 00000000fc82d000
>
> (XEN)
>
> (XEN) Command line: console=dtuart earlyprintk=xen
> earlycon=uart8250,mmio32,0x70006000 sync_console dom0_mem=512M
> log_lvl=all guest_loglvl=all console_to_ring
FWIW, earlyprintk and earlycon are not understood by Xen. They are only
useful for Dom0.
Best regards,
--
Julien Grall
next prev parent reply other threads:[~2020-07-23 18:04 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-22 17:57 Porting Xen to Jetson Nano Srinivas Bangalore
2020-07-23 4:26 ` Christopher Clark
2020-07-23 15:42 ` Srinivas Bangalore
2020-07-23 17:04 ` Julien Grall
2020-07-23 17:19 ` Julien Grall
2020-07-23 18:04 ` Julien Grall [this message]
2020-07-24 15:01 ` Srinivas Bangalore
2020-07-24 17:25 ` Julien Grall
2020-07-27 22:09 ` Srinivas Bangalore
2020-07-28 16:56 ` Julien Grall
2020-07-28 17:18 ` Srinivas Bangalore
2020-07-28 18:01 ` Rich Persaud
2020-07-29 17:25 ` srini
2020-07-30 1:27 ` Stefano Stabellini
2020-07-30 18:58 ` srini
2020-07-31 1:16 ` Stefano Stabellini
-- strict thread matches above, loose matches on Subject: below --
2020-07-20 10:50 Srinivas Bangalore
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=9736680b-1c81-652b-552b-4103341bad50@xen.org \
--to=julien@xen.org \
--cc=christopher.w.clark@gmail.com \
--cc=srini@yujala.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).