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

Re: [Xen-devel] ThunderX support in Xen



Hi Stefano,

On 31/01/18 00:01, Stefano Stabellini wrote:
> I am testing Xen support in ThunderX, but I am having some issues
> booting Dom0 using Xen staging and the Ubuntu Xenial kernel (it has
> CONFIG_XEN enabled). The trace is appened to this email. I am using the
> device tree converted from /proc/device-tree on the running system
> without Xen.

Why do you need to convert the DT from /proc/device-tree? You should just
rely on the one provided by the firmware directly.

> [    3.273098] Unable to handle kernel NULL pointer dereference at virtual 
> address 00000080
> [    3.281254] pgd = ffff00000946d000
> [    3.284721] [00000080] *pgd=00000000bfffe003, *pud=00000000bfffd003, 
> *pmd=0000000000000000
> [    3.293059] Internal error: Oops: 96000004 [#1] SMP
> [    3.298001] Modules linked in:
> [    3.301127] CPU: 81 PID: 1 Comm: swapper/0 Not tainted 4.10.0-38-generic 
> #42~16.04.1-Ubuntu
> [    3.309564] Hardware name: cavium,thunder-88xx (DT)
> [    3.314492] task: ffff80007c573a00 task.stack: ffff80007c578000
> [    3.320485] PC is at arm_smmu_device_cfg_probe+0x300/0x770
> [    3.326039] LR is at arm_smmu_device_cfg_probe+0x25c/0x770

SMMU should not be assigned to the hardware domain. Cavium has a specific
compatible for their SMMUs which is not in Xen yet.

There was an attempt to add the compatible in Xen (see [1] which I didn't
ack because the SMMU changes for Cavium were not added.

Until the SMMU driver properly support Cavium's SMMU, we should blacklist
them.

When working on getting Xen booting on rochester{0,1} (Thunder-X in Osstest),
I blacklist them with this small patch. I will clean-up it and send it on the 
ML:

diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index 155c952349..8b7fb0e12a 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -1182,6 +1182,7 @@ static int handle_node(struct domain *d, struct 
kernel_info *kinfo,
         DT_MATCH_TYPE("memory"),
         /* The memory mapped timer is not supported by Xen. */
         DT_MATCH_COMPATIBLE("arm,armv7-timer-mem"),
+        DT_MATCH_COMPATIBLE("cavium,smmu-v2"),
         { /* sentinel */ },
     };
     static const struct dt_device_match timer_matches[] __initconst =

The only other issues I found was when booting using Grub. I needed to bump the
number of banks.

By the way, if you haven't done it. I would highly recommend to upgrade to the 
latest
firmware.

Cheers,

[1] https://lists.xen.org/archives/html/xen-devel/2017-06/msg02293.html

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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