01-12-2021 04:52 AM
Hi,
Since upgrading to Petalinux 2020.2 I am getting unhandled context faults when trying to start a xen domU (guest) with a SD card partition as virtual disk. It works if i instead move the same partition into a ramdisk and boot with it, so it seems like there is something wrong with the SD card driver. The domU is booted from a dom0 with the command 'xl create -c -f guest0.cfg', and the .cfg contains the line 'disk = ["/dev/mmcblk0p3,,hda,rw"]' which causes the error. The disk command is documented here http://xenbits.xenproject.org/docs/4.13-testing/man/xl-disk-configuration.5.html , but the same command worked in Petalinux 2019.2 so it seems to correct.
I get this error repeatedly:
(XEN) smmu: /smmu@fd800000: Unhandled context fault: fsr=0x402, iova=0x4c5398000, fsynr=0x80012, cb=0
[ 89.506913] mmc0: Timeout waiting for hardware interrupt.
[ 89.506972] mmc0: sdhci: ============ SDHCI REGISTER DUMP ===========
[ 89.513258] mmc0: sdhci: Sys addr: 0x00000000 | Version: 0x00001002
[ 89.519743] mmc0: sdhci: Blk size: 0x00007200 | Blk cnt: 0x00000000
[ 89.526231] mmc0: sdhci: Argument: 0x019c1000 | Trn mode: 0x00000013
[ 89.532718] mmc0: sdhci: Present: 0x01f70206 | Host ctl: 0x0000001f
[ 89.539206] mmc0: sdhci: Power: 0x0000000f | Blk gap: 0x00000080
[ 89.545693] mmc0: sdhci: Wake-up: 0x00000000 | Clock: 0x00000207
[ 89.552181] mmc0: sdhci: Timeout: 0x00000004 | Int stat: 0x00000000
[ 89.558668] mmc0: sdhci: Int enab: 0x03ff008b | Sig enab: 0x03ff008b
[ 89.565156] mmc0: sdhci: ACmd stat: 0x00000000 | Slot int: 0x00000000
[ 89.571643] mmc0: sdhci: Caps: 0x31e8c881 | Caps_1: 0x00002007
[ 89.578131] mmc0: sdhci: Cmd: 0x0000113a | Max curr: 0x00000000
[ 89.584618] mmc0: sdhci: Resp[0]: 0x00000900 | Resp[1]: 0x478008f0
[ 89.591106] mmc0: sdhci: Resp[2]: 0x53433136 | Resp[3]: 0x00035344
[ 89.597592] mmc0: sdhci: Host ctl2: 0x00000001
[ 89.602092] mmc0: sdhci: ADMA Err: 0x00000000 | ADMA Ptr: 0x00000004e863520c
[ 89.609270] mmc0: sdhci: ============================================
[ 89.619234] blk_update_request: I/O error, dev mmcblk0, sector 27004928 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
I already tried some things in the dom0 (host) kernel config regarding the SD card driver config, but to no success until now.
Petalinux 2020.2 is using Xen 4.13.0 while Petalinux 2019.2 was using Xen 4.11.2-pre, but i don't think there is something wrong with Xen as it boots with a ramdisk without problems (with this .cfg line: 'disk = ["/dev/ram0,,hda,rw"]'). Nonetheless for anyone interested, here is the output of my xl info:
root@xenhost:~# xl info host : xenhost release : 5.4.0-xilinx-v2020.2 version : #1 SMP Tue Jan 12 10:37:11 UTC 2021 machine : aarch64 nr_cpus : 4 max_cpu_id : 3 nr_nodes : 1 cores_per_socket : 1 threads_per_core : 1 cpu_mhz : 100.000 hw_caps : 00000000:00000000:00000000:00000000:00000000:00000000:00000000:00000000 virt_caps : hvm hvm_directio hap iommu_hap_pt_share total_memory : 6143 free_memory : 1917 sharing_freed_memory : 0 sharing_used_memory : 0 outstanding_claims : 0 free_cpus : 0 xen_major : 4 xen_minor : 13 xen_extra : .0 xen_version : 4.13.0 xen_caps : xen-3.0-aarch64 xen-3.0-armv7l xen_scheduler : null xen_pagesize : 4096 platform_params : virt_start=0x200000 xen_changeset : Tue Sep 29 15:34:31 2020 -0700 git:dfa58d1a3f-dirty xen_commandline : console=dtuart dtuart=serial0 dom0_mem=4G dom0_max_vcpus=1 bootscrub=0 vwfi=native sched=null cc_compiler : aarch64-xilinx-linux-gcc (GCC) 9.2.0 cc_compile_by : SKYNETorych cc_compile_domain : skynet.internal cc_compile_date : Tue Jan 12 10:36:45 UTC 2021 build_id : 7b82382a3f2346f4b283bdc3cccd44a3003517a4 xend_config_format : 4
I don't know what those values in the context fault error message are supposed to mean, maybe somebody can help me with that?
Thanks.
01-13-2021 09:50 AM
Could you check in your device-tree if you have smmu enabled?
01-14-2021 12:40 AM
Yes, i have an enabled smmu:
smmu@fd800000 {
compatible = "arm,mmu-500";
reg = <0x00 0xfd800000 0x00 0x20000>;
#iommu-cells = <0x01>;
status = "okay";
#global-interrupts = <0x01>;
interrupt-parent = <0x04>;
interrupts = <0x00 0x9b 0x04 0x00 0x9b 0x04 0x00 0x9b 0x04 0x00 0x9b 0x04 0x00 0x9b 0x04 0x00 0x9b 0x04 0x00 0x9b 0x04 0x00 0x9b 0x04 0x00 0x9b 0x04 0x00 0x9b 0x04 0x00 0x9b 0x04 0x00 0x9b 0x04 0x00 0x9b 0x04 0x00 0x9b 0x04 0x00 0x9b 0x04 0x00 0x9b 0x04 0x00 0x9b 0x04>;
mmu-masters = <0x0c 0x874 0x0d 0x875 0x0e 0x876 0x0f 0x877 0x10 0x860 0x11 0x861 0x12 0x873 0x13 0x868 0x14 0x869 0x15 0x86a 0x16 0x86b 0x17 0x86c 0x18 0x86d 0x19 0x86e 0x1a 0x86f 0x1b 0x14e8 0x1c 0x14e9 0x1d 0x14ea 0x1e 0x14eb 0x1f 0x14ec 0x20 0x14ed 0x21 0x14ee 0x22 0x14ef 0x23 0x870 0x24 0x871 0x25 0x872>;
phandle = <0x28>;
};
I also checked my old DT (from Petalinux 2019.2) and it is the same in regards to the smmu.
01-15-2021 07:28 AM
Is there any way to change the version of xen which is used by Petalinux? I would like to try out another version, but there are so many different files regarding xen in the components that i don't really know what i need to modify.