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

Re: [Xen-devel] SMMU, Unhandled context fault

On 25/04/2016 09:54, Peng Fan wrote:
Hi Julien, Stefano

Hello Peng,

I met an issue when passthrough a device to DomU, and have no clear idea what's 

Which version of the SMMU is present on the board? Is it SMMUv1 or SMMUv2?

The SMMU drivers in Xen has been ported from Linux last year. It might be possible that some bug fixes need to be ported.

(XEN) smmu: /iommu@5c800000: Unhandled context fault: iova=0x42188000, 
fsynr=0x433, cb=0
(XEN) smmu: /iommu@5c800000: Unhandled context fault: iova=0x42188020, 
fsynr=0x433, cb=0

The IOVA corresponds to a guest RAM address. It would be useful if you provide the Xen boot logs.

fsynr is 0x433, PTWF is 1, which means
"An external fault occurred while processing a translation table walk"

My DomU cfg is:
kernel = "/root/xen/Image"
device_tree = "/root/xen/sdhc.dtb"
dtdev = [ "/usdhc@5a240000" ]
iomem = [ "0x5a240,0x10@0x1a240"]
irqs = [ 257 ]
memory = "128"
name = "domU-sdhc-test"
vcpus = 1
disk = [ 'phy:/dev/loop0,xvda,w' ]
extra = "console=hvc0 root=/dev/xvda debug=/bin/sh"

I saw this patch: http://www.gossamer-threads.com/lists/xen/devel/428030
"xen/arm: Force broadcast of TLB and instruction cache maintenance instructions"
So I guess should we have a similar fix for SMMU TLB?

That is different.

Xen only supports SMMU for stage-2 page table, so the hypervisor is in charge of flushing the SMMU TLBs when the translation IPA -> PA is changed.

The patch "xen/arm: Force broadcast..." will set HCR_EL2.FB to upgrade any local flush instruction made by a guest into innershareable flush instruction.

 From my failure log, It should be that TCU can not find the machine address 
for iova(guest physical address).

What do you mean by TCU?


Julien Grall

Xen-devel mailing list



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