linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RFC on Kdump and PCIe on ARM64
@ 2018-03-01 17:44 Sinan Kaya
  2018-03-01 19:05 ` Bjorn Helgaas
  0 siblings, 1 reply; 10+ messages in thread
From: Sinan Kaya @ 2018-03-01 17:44 UTC (permalink / raw)
  To: Lorenzo Pieralisi, Will Deacon, Linux PCI,
	linux-arm Mailing List, Nate Watterson, shankerd, Vikram Sethi,
	Goel, Sameer, kexec

Hi,

We are seeing IOMMU faults when booting the kdump kernel on ARM64.

[    7.220162] arm-smmu-v3 arm-smmu-v3.0.auto: event 0x02 received:
[    7.226123] arm-smmu-v3 arm-smmu-v3.0.auto:            0x0000010000000002
[    7.232023] arm-smmu-v3 arm-smmu-v3.0.auto:            0x0000000000000000
[    7.237925] arm-smmu-v3 arm-smmu-v3.0.auto:            0x0000000000000000
[    7.243827] arm-smmu-v3 arm-smmu-v3.0.auto:            0x0000000000000000

This is Nate's interpretation of the fault:

"The PCI device is sending transactions just after the SMMU was reset/reinitialized
which is problematic because the device has not yet been added to the SMMU
and thus should not be doing *any* DMA.  DMA from the PCI devices should be
quiesced prior to starting the crashdump kernel or you risk overwriting portions
of memory you meant to preserve. In this case the SMMU was actually doing you a favor
by blocking these errant DMA operations!!"

I think this makes sense especially for the IOMMU enabled case on the host where an
IOVA can overlap with the region of memory kdump reserved for itself.

Apparently, there has been similar concerns in the past.

https://www.fujitsu.com/jp/documents/products/software/os/linux/catalog/LinuxConJapan2013-Indoh.pdf

and was not addressed globally due to IOMMU+PCI driver ordering issues and bugs in
HW due to hot reset.

https://lkml.org/lkml/2012/8/3/160

Hot reset as mentioned is destructive and may not be the best implementation choice. 
However, most of the modern endpoints support PCIE function level reset.

One other solution is for SMMUv3 driver to reserve the kdump used IOVA addresses.

Another solution is for the SMMUv3 driver to disable PCIe devices behind the SMMU
if it see SMMU is already enabled.

Appreciate the feedback,
Sinan

-- 
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-03-02 18:37 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-01 17:44 RFC on Kdump and PCIe on ARM64 Sinan Kaya
2018-03-01 19:05 ` Bjorn Helgaas
2018-03-01 19:19   ` Sinan Kaya
2018-03-02  0:03     ` Bjorn Helgaas
2018-03-02 10:30       ` Will Deacon
2018-03-02 14:12         ` Sinan Kaya
2018-03-02 18:02           ` Will Deacon
2018-03-02 18:37             ` Sinan Kaya
2018-03-02 14:20       ` Sinan Kaya
2018-03-02  1:44   ` Baoquan He

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).