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

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

On 28/04/16 07:39, Peng Fan wrote:
Hi Julien,

Hello Peng,

On Thu, Apr 28, 2016 at 10:37:54AM +0800, Peng Fan wrote:
Hi Julien,
On Wed, Apr 27, 2016 at 10:58:28AM +0100, Julien Grall wrote:
Hello Peng,

On 27/04/2016 03:02, Peng Fan wrote:
On Tue, Apr 26, 2016 at 04:30:03PM +0200, Edgar E. Iglesias wrote:
On Tue, Apr 26, 2016 at 09:56:33PM +0800, Peng Fan wrote:
You mean the PNU bit(Privileged Not Unprivileged) is 1?
I did not met Unhandled context fault each time.
Actually during my serveral boot test, I only met two times.

I meant the NSSTATE and NSATTR bits in FSYNR are set to zero. I get the
impression that the TrustZone state for the SD controller may be

oh. The NSATTR bit is 0. I did not find NSSTATE in my Issue D SMMU spec.
If without xen, only one linux boots up, sd controller can access memory using
DMA without issue.

IIRC, by default Linux baremetal does not protect the devices with the SMMU.

I would recommend you to check whether the SMMUs are in-used and configured
to generate a fault (disable_bypass = 1).

Ok. I'll set S2CRn to generate fault in xen smmu driver to see whether SMMUs 
in-used or not

I meant in Linux.

I found a patch for errata of mmu-500,
Do you know this?

I suspect the unstable issue on my platform seems related to this errata,
but i do not have details about this errata.

Have you tried to port the patch to Xen and see if it helps?

I do the following change:
        //s2cr = S2CR_TYPE_TRANS | S2CR_PRIVCFG_UNPRIV |
                (smmu_domain->cfg.cbndx << S2CR_CBNDX_SHIFT);

Now XEN SMMU driver reports that:
(XEN) smmu: /iommu@5c800000: Unexpected global fault, this could be serious
(XEN) smmu: /iommu@5c800000:    GFSR 0x00000001, GFSYNR0 0x00000004, GFSYNR1 
0x00000011, GFSYNR2 0x00000000

So I think SMMU is working.

Well, it does not help to know whether the SMMU has been correctly initialized by Xen.


Julien Grall

Xen-devel mailing list



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