dmar fault right around domain switch in iommu_need_mapping
Hi Joerg and Baolu,
I'm chasing down one last issue. I'm waiting to hear back from them testing with Joerg's patchset, but I'm guessing this will still pop up. It looks like right around when the domain switch occurs in iommu_need_mapping there are some dmar faults (below is from 5.6-rc1 plus earlier fix attempt that moved deferred attach to beginning of iommu_need_mapping):
[ 12.546920] DMAR: DRHD: handling fault status reg 2 [ 12.546923] DMAR: [DMA Read] Request device [02:00.0] PASID ffffffff fault addr 791dd000 [fault reason 02] Present bit in context entry is clear [ 12.635193] hpsa 0000:02:00.0: Using iommu dma mapping [ 12.776712] hpsa 0000:02:00.0: DMAR: 32bit DMA uses non-identity mapping
[ 14.091219] DMAR: [DMA Read] Request device [07:00.0] PASID ffffffff fault addr 791dd000 [fault reason 02] Present bit in context entry is clear [ 14.180842] DMAR: DRHD: handling fault status reg 202 [ 14.180845] DMAR: [DMA Read] Request device [07:00.0] PASID ffffffff fault addr 791dd000 [fault reason 02] Present bit in context entry is clear [ 14.268756] DMAR: DRHD: handling fault status reg 302 [ 15.542551] hpsa 0000:07:00.0: Using iommu dma mapping [ 15.567256] hpsa 0000:07:00.0: DMAR: 32bit DMA uses non-identity mapping
It seems to only happen right then, and then things are fine. Happens during both regular and kdump boot. With the kdump boot the faults are from the hpilo in the logs I'm looking at, so it doesn't seem to be tied to a device, or certain rmrr. The faulting address always seems to be the base address of the rmrr. The dmar tables look sane.
Regards,
Jerry
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu
Hi Jerry,
Quoted 22 lines · Jerry Snitselaar
Hi Joerg and Baolu,
I'm chasing down one last issue. I'm waiting to hear back from them testing with Joerg's patchset, but I'm guessing this will still pop up. It looks like right around when the domain switch occurs in
iommu_need_mappingthere are some dmar faults (below is from 5.6-rc1 plus earlier fix attempt that moved deferred attach to beginning ofiommu_need_mapping):[ 12.546920] DMAR: DRHD: handling fault status reg 2
[ 12.546923] DMAR: [DMA Read] Request device [02:00.0] PASID ffffffff fault addr791dd000[fault reason 02] Present bit in context entry is clear [ 12.635193] hpsa 0000:02:00.0: Using iommu dma mapping
[ 12.776712] hpsa 0000:02:00.0: DMAR: 32bit DMA uses non-identity mapping[ 14.091219] DMAR: [DMA Read] Request device [07:00.0] PASID ffffffff fault addr
791dd000[fault reason 02] Present bit in context entry is clear [ 14.180842] DMAR: DRHD: handling fault status reg 202
[ 14.180845] DMAR: [DMA Read] Request device [07:00.0] PASID ffffffff fault addr791dd000[fault reason 02] Present bit in context entry is clear [ 14.268756] DMAR: DRHD: handling fault status reg 302
[ 15.542551] hpsa 0000:07:00.0: Using iommu dma mapping
[ 15.567256] hpsa 0000:07:00.0: DMAR: 32bit DMA uses non-identity mapping
Quoted 5 lines
It seems to only happen right then, and then things are fine. Happens during both regular and kdump boot. With the kdump boot the faults are from the hpilo in the logs I'm looking at, so it doesn't seem to be tied to a device, or certain rmrr. The faulting address always seems to be the base address of the rmrr. The dmar tables look sane.
Perhaps like this?
The device was boot with an identity domain (iommu=pt). When loading the driver for this device, iommu driver finds that it's a 32-bit device and tries to convert it to DMA domain. The rmrr is still active during the switch, hence you see dma faults during that time window.
Best regards,
baolu
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu
Quoted 33 lines · Lu Baolu
Hi Jerry,
Quoted 22 lines · Jerry Snitselaar
Hi Joerg and Baolu,
I'm chasing down one last issue. I'm waiting to hear back from them testing with Joerg's patchset, but I'm guessing this will still pop up. It looks like right around when the domain switch occurs in
iommu_need_mappingthere are some dmar faults (below is from 5.6-rc1 plus earlier fix attempt that moved deferred attach to beginning ofiommu_need_mapping):[ 12.546920] DMAR: DRHD: handling fault status reg 2
[ 12.546923] DMAR: [DMA Read] Request device [02:00.0] PASID ffffffff fault addr791dd000[fault reason 02] Present bit in context entry is clear [ 12.635193] hpsa 0000:02:00.0: Using iommu dma mapping
[ 12.776712] hpsa 0000:02:00.0: DMAR: 32bit DMA uses non-identity mapping[ 14.091219] DMAR: [DMA Read] Request device [07:00.0] PASID ffffffff fault addr
791dd000[fault reason 02] Present bit in context entry is clear [ 14.180842] DMAR: DRHD: handling fault status reg 202
[ 14.180845] DMAR: [DMA Read] Request device [07:00.0] PASID ffffffff fault addr791dd000[fault reason 02] Present bit in context entry is clear [ 14.268756] DMAR: DRHD: handling fault status reg 302
[ 15.542551] hpsa 0000:07:00.0: Using iommu dma mapping
[ 15.567256] hpsa 0000:07:00.0: DMAR: 32bit DMA uses non-identity mappingQuoted 5 lines
It seems to only happen right then, and then things are fine. Happens during both regular and kdump boot. With the kdump boot the faults are from the hpilo in the logs I'm looking at, so it doesn't seem to be tied to a device, or certain rmrr. The faulting address always seems to be the base address of the rmrr. The dmar tables look sane.
Perhaps like this?
Quoted 8 lines
The device was boot with an identity domain (iommu=pt). When loading the driver for this device, iommu driver finds that it's a 32-bit device and tries to convert it to DMA domain. The rmrr is still active during the switch, hence you see dma faults during that time window.
Best regards,
baolu
It looks like it doesn't occur with Joerg's patchset.
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu
Hi,
Quoted 39 lines · Jerry Snitselaar
Quoted 38 lines · Lu Baolu
Hi Jerry,
Quoted 22 lines · Jerry Snitselaar
Hi Joerg and Baolu,
I'm chasing down one last issue. I'm waiting to hear back from them testing with Joerg's patchset, but I'm guessing this will still pop up. It looks like right around when the domain switch occurs in
iommu_need_mappingthere are some dmar faults (below is from 5.6-rc1 plus earlier fix attempt that moved deferred attach to beginning ofiommu_need_mapping):[ 12.546920] DMAR: DRHD: handling fault status reg 2
[ 12.546923] DMAR: [DMA Read] Request device [02:00.0] PASID ffffffff fault addr791dd000[fault reason 02] Present bit in context entry is clear [ 12.635193] hpsa 0000:02:00.0: Using iommu dma mapping
[ 12.776712] hpsa 0000:02:00.0: DMAR: 32bit DMA uses non-identity mapping[ 14.091219] DMAR: [DMA Read] Request device [07:00.0] PASID ffffffff fault addr
791dd000[fault reason 02] Present bit in context entry is clear [ 14.180842] DMAR: DRHD: handling fault status reg 202
[ 14.180845] DMAR: [DMA Read] Request device [07:00.0] PASID ffffffff fault addr791dd000[fault reason 02] Present bit in context entry is clear [ 14.268756] DMAR: DRHD: handling fault status reg 302
[ 15.542551] hpsa 0000:07:00.0: Using iommu dma mapping
[ 15.567256] hpsa 0000:07:00.0: DMAR: 32bit DMA uses non-identity mappingQuoted 5 lines
It seems to only happen right then, and then things are fine. Happens during both regular and kdump boot. With the kdump boot the faults are from the hpilo in the logs I'm looking at, so it doesn't seem to be tied to a device, or certain rmrr. The faulting address always seems to be the base address of the rmrr. The dmar tables look sane.
Perhaps like this?
The device was boot with an identity domain (iommu=pt). When loading the driver for this device, iommu driver finds that it's a 32-bit device and tries to convert it to DMA domain. The rmrr is still active during the switch, hence you see dma faults during that time window.
Quoted 6 lines
Quoted 3 lines
Best regards,
baoluIt looks like it doesn't occur with Joerg's patchset.
Okay. Cool!
Best regards,
baolu
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu