Skip to content

Fix AMD IOMMU faults in kdump kernel

Baoquan He linux-iommu 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest12 patches 16 repliesIn review
  2. v29 patches 18 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12iommu/amd: Use standard bitmap operation to set bitmapdrivers/iommu/amd_iommu.c drivers/iommu/amd_iommu_init.c+3 -30 replies
2/12iommu/amd: Detect pre enabled translationdrivers/iommu/amd_iommu_init.c drivers/iommu/amd_iommu_proto.h+30 -00 replies
3/12iommu/amd: move dte irq macro defitions to amd_iommu_types.hdrivers/iommu/amd_iommu.c drivers/iommu/amd_iommu_types.h+5 -42 replies
4/12iommu/amd: add copy_irq_table functiondrivers/iommu/amd_iommu.c drivers/iommu/amd_iommu_init.c drivers/iommu/amd_iommu_proto.h+45 -12 replies
5/12iommu/amd: change IOMMU_PTE_P to IOMMU_PTE_Vdrivers/iommu/amd_iommu.c drivers/iommu/amd_iommu_types.h+8 -84 replies
6/12iommu/amd: Clean up the useless IOMMU_PTE_U/IOMMU_PTE_FCdrivers/iommu/amd_iommu.c drivers/iommu/amd_iommu_types.h+3 -52 replies
7/12iommu/amd: Add function copy_dev_tablesdrivers/iommu/amd_iommu.c drivers/iommu/amd_iommu_init.c drivers/iommu/amd_iommu_types.h+42 -10 replies
8/12iommu/amd: set the device table and re-enable event/cmd bufferdrivers/iommu/amd_iommu_init.c+24 -100 replies
9/12iommu/amd: Don't update the domain information to iommu dev before dev initdrivers/iommu/amd_iommu.c+9 -50 replies
10/12iommu/amd: Update related domain info to dev when dev driver initdrivers/iommu/amd_iommu.c+11 -00 replies
11/12iommu/amd: No need to wait iommu completion if no dte irq entry changedrivers/iommu/amd_iommu.c+3 -33 replies
12/12iommu/amd: fix a code bug in do_attachdrivers/iommu/amd_iommu.c+1 -11 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [Patch v3 00/12] Fix AMD IOMMU faults in kdump kernel

This is v3 post. Now the situation is patchset test on amd-vi v2 machine is OK, however still some IO_PAGE_FAULT warning is printed out on v1 machine. The log will be attached later.

I didn't figure out what caused the warning, so post them to ask for help.

The strategy is unchanged:
1) Copy old dev tables and old irq tables to kdump kernel
2) Insatll this newly copied DTE to iommu
3) Hold the updating of domain info to iommu dev, mainly the io page table
4) Update domain info to iommu dev as soon as dev is initialized

Baoquan He (12):
iommu/amd: Use standard bitmap operation to set bitmap iommu/amd: Detect pre enabled translation
iommu/amd: move dte irq macro defitions to amd_iommu_types.h iommu/amd: add copy_irq_table function
iommu/amd: change IOMMU_PTE_P to IOMMU_PTE_V
iommu/amd: Clean up the useless IOMMU_PTE_U/IOMMU_PTE_FC iommu/amd: Add function copy_dev_tables
iommu/amd: set the device table and re-enable event/cmd buffer iommu/amd: Don't update the domain information to iommu dev before dev
init
iommu/amd: Update related domain info to dev when dev driver init iommu/amd: No need to wait iommu completion if no dte irq entry change iommu/amd: fix a code bug in do_attach

 drivers/iommu/amd_iommu.c       |  51 ++++++++------
 drivers/iommu/amd_iommu_init.c  | 147 ++++++++++++++++++++++++++++++++++++----
 drivers/iommu/amd_iommu_proto.h |   5 ++
 drivers/iommu/amd_iommu_types.h |  14 ++--
 4 files changed, 180 insertions(+), 37 deletions(-)
Signature · 1 line
2.1.0