Mailing List Archive

Xen SMMU support
Hi,

I am currently running Xen with SMMU enabled on an ARM64 platform with 4 Cortex-A72 cores, GICv2 and SMMUv2. There are SMMU faults when booting Dom0, such as:

[ 3.972767] mmc0: sdhci: Resp(XEN) smmu: /soc/iommu@9000000: Unhandled context fault: fsr=0x402, iova=0xea060200, fsynr=0x180000, cb=0

Has someone encountered such problems and can provide some guidelines for SMMU support on Dom0?

Regards,
Anda
RE: Xen SMMU support [ In reply to ]
Subject: Xen SMMU support

Hi,

I am currently running Xen with SMMU enabled on an ARM64 platform with 4 Cortex-A72 cores, GICv2 and SMMUv2. There are SMMU faults when booting Dom0, such as:

??????????????? [??? 3.972767] mmc0: sdhci: Resp(XEN) smmu: /soc/iommu@9000000: Unhandled context fault: fsr=0x402, iova=0xea060200, fsynr=0x180000, cb=0 ?

Has someone encountered such problems and can provide some guidelines for SMMU support on Dom0?


[Peng]: You enabled SMMU for Dom0? Which master issues 0xea060200? Did you let smmu cb0 sharing same mmu table as dom0 mmu stage2?

Regards,
Peng.

Regards,
Anda
Re: Xen SMMU support [ In reply to ]
Hi Anda

> On 2 Jul 2020, at 06:54, Anda-alexandra Dorneanu <anda-alexandra.dorneanu@nxp.com> wrote:
>
> Hi,
>
> I am currently running Xen with SMMU enabled on an ARM64 platform with 4 Cortex-A72 cores, GICv2 and SMMUv2. There are SMMU faults when booting Dom0, such as:
>
> [ 3.972767] mmc0: sdhci: Resp(XEN) smmu: /soc/iommu@9000000: Unhandled context fault: fsr=0x402, iova=0xea060200, fsynr=0x180000, cb=0
>
> Has someone encountered such problems and can provide some guidelines for SMMU support on Dom0?

This means that the access to 0xea060200 was forbidden by the SMMU.
It also tells you that the DMA master ID of your device is handled by the SMMU context bank 0

So first thing to check is if 0xea060200 is a valid guest physical address in your Dom0.
Normally Xen should use the same page tables for the SMMU and the dom0 so if something is accessible by the guest it is accessible for the devices assign to it.
Here the device seem to properly be assigned to dom0 so maybe the driver is trying to hit somewhere invalid ?

Regards
Bertrand

>
> Regards,
> Anda
RE: [EXT] Re: Xen SMMU support [ In reply to ]
-----Original Message-----
From: Bertrand Marquis <Bertrand.Marquis@arm.com>
Sent: Thursday, July 2, 2020 12:55 PM
To: Anda-alexandra Dorneanu <anda-alexandra.dorneanu@nxp.com>
Cc: xen-users@lists.xenproject.org; nd <nd@arm.com>; Rahul Singh <Rahul.Singh@arm.com>
Subject: [EXT] Re: Xen SMMU support

Caution: EXT Email

Hi Anda

> On 2 Jul 2020, at 06:54, Anda-alexandra Dorneanu <anda-alexandra.dorneanu@nxp.com> wrote:
>
> Hi,
>
> I am currently running Xen with SMMU enabled on an ARM64 platform with 4 Cortex-A72 cores, GICv2 and SMMUv2. There are SMMU faults when booting Dom0, such as:
>
> [ 3.972767] mmc0: sdhci: Resp(XEN) smmu: /soc/iommu@9000000: Unhandled context fault: fsr=0x402, iova=0xea060200, fsynr=0x180000, cb=0
>
> Has someone encountered such problems and can provide some guidelines for SMMU support on Dom0?

This means that the access to 0xea060200 was forbidden by the SMMU.
It also tells you that the DMA master ID of your device is handled by the SMMU context bank 0

So first thing to check is if 0xea060200 is a valid guest physical address in your Dom0.
Normally Xen should use the same page tables for the SMMU and the dom0 so if something is accessible by the guest it is accessible for the devices assign to it.
Here the device seem to properly be assigned to dom0 so maybe the driver is trying to hit somewhere invalid ?

[Anda]: Thank you for the given suggestions.
Turns out that it was an issue with the Xen SMMU driver. We will send a patch with the fix.

Regards,
Anda

Regards
Bertrand

>
> Regards,
> Anda