Skip to content

Bugfixes and improvements for Intel IOMMU drivers

Jiang Liu linux-iommu linux-pci lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest20 patches 3 repliesIn review
  2. v220 patches 2 repliesSuperseded

Changes in v3 from the cover letter

1) address review comments of last round

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/20iommu/vt-d: use dedicated bitmap to track remapping entry allocation statusdrivers/iommu/intel_irq_remapping.c include/linux/intel-iommu.h+27 -290 replies
2/20iommu/vt-d: fix PCI device reference leakage on error recovery pathdrivers/iommu/dmar.c include/linux/dmar.h+13 -21 reply
3/20iommu/vt-d: fix a race window in allocating domain ID for virtual machinesdrivers/iommu/intel-iommu.c+2 -20 replies
4/20iommu/vt-d: fix resource leakage on error recovery path in iommu_init_domains()drivers/iommu/intel-iommu.c+8 -40 replies
5/20iommu/vt-d, trivial: refine support of 64bit guest addressdrivers/iommu/intel-iommu.c+5 -60 replies
6/20iommu/vt-d, trivial: print correct domain id of static identity domaindrivers/iommu/intel-iommu.c+2 -20 replies
7/20iommu/vt-d, trivial: check suitable flag in function detect_intel_iommu()drivers/iommu/dmar.c drivers/iommu/intel_irq_remapping.c+2 -80 replies
8/20iommu/vt-d, trivial: clean up unused codedrivers/iommu/dmar.c drivers/iommu/intel-iommu.c+0 -270 replies
9/20iommu/vt-d: mark internal functions as staticdrivers/iommu/dmar.c drivers/iommu/intel_irq_remapping.c include/linux/dmar.h +1 more+10 -162 replies
10/20iommu/vt-d, trivial: use defined macro instead of hardcodingdrivers/iommu/intel_irq_remapping.c+1 -10 replies
11/20iommu/vt-d, trivial: simplify code with existing macrosdrivers/iommu/dmar.c drivers/iommu/intel-iommu.c drivers/iommu/intel_irq_remapping.c +1 more+29 -680 replies
12/20iommu/vt-d: fix invalid memory access when freeing DMAR irqdrivers/iommu/intel-iommu.c+1 -10 replies
13/20iommu/vt-d: keep shared resources when failed to initialize iommu devicesdrivers/iommu/dmar.c drivers/iommu/intel-iommu.c include/linux/dma_remapping.h +1 more+43 -310 replies
14/20iommu/vt-d: avoid double free in error recovery pathdrivers/iommu/intel-iommu.c+3 -110 replies
15/20iommu/vt-d: fix access after free issue in function free_dmar_iommu()drivers/iommu/intel-iommu.c+4 -30 replies
16/20iommu/vt-d: release invalidation queue when destroying IOMMU unitdrivers/iommu/dmar.c+6 -00 replies
17/20iommu/vt-d: fix wrong return value of dmar_table_init()drivers/iommu/dmar.c+14 -150 replies
18/20iommu/vt-d, PCI, trivial: use dev_is_pci() instead of hardcodingdrivers/iommu/intel-iommu.c+1 -10 replies
19/20iommu/vt-d, trivial: clean sparse warningsdrivers/iommu/dmar.c drivers/iommu/intel-iommu.c drivers/iommu/intel_irq_remapping.c +1 more+11 -113 replies
20/20iommu/vt-d: free all resources if failed to initialize DMARsdrivers/iommu/intel-iommu.c+49 -320 replies

Reviews trailers per patch

4 of 20 patches have a Reviewed-by or Acked-by.

PatchYijing Wang
1/20Tested-and-reviewed-by
2/20R-b
3/20
4/20A-b
5/20
6/20
7/20R-b
8/20
9/20
10/20
11/20
12/20R-b
13/20
14/20
15/20
16/20
17/20
18/20
19/20
20/20

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [Patch Part1 V3 00/20] Bugfixes and improvements for Intel IOMMU drivers

This patchset includes several bugfixes and code improvements for Intel DMA remapping and interrupt remapping drivers. It's also a preparation for Intel IOMMU device hotplug.

It applies to the latest mainstream kernel on top of

	commit 7e3528c3660a2e8602abc7858b0994d611f74bc3

It has been tested on Intel SandyBridge and Romley-4S platforms.

Thanks!

V2->V3:
1) address review comments of last round

Jiang Liu (20):
iommu/vt-d: use dedicated bitmap to track remapping entry allocation
status
iommu/vt-d: fix PCI device reference leakage on error recovery path iommu/vt-d: fix a race window in allocating domain ID for virtual
machines
iommu/vt-d: fix resource leakage on error recovery path in
iommu_init_domains()
iommu/vt-d, trivial: refine support of 64bit guest address iommu/vt-d, trivial: print correct domain id of static identity
domain
iommu/vt-d, trivial: check suitable flag in function
detect_intel_iommu()
iommu/vt-d, trivial: clean up unused code
iommu/vt-d: mark internal functions as static
iommu/vt-d, trivial: use defined macro instead of hardcoding iommu/vt-d, trivial: simplify code with existing macros iommu/vt-d: fix invalid memory access when freeing DMAR irq iommu/vt-d: keep shared resources when failed to initialize iommu
devices
iommu/vt-d: avoid double free in error recovery path iommu/vt-d: fix access after free issue in function free_dmar_iommu() iommu/vt-d: release invalidation queue when destroying IOMMU unit iommu/vt-d: fix wrong return value of dmar_table_init() iommu/vt-d, PCI, trivial: use dev_is_pci() instead of hardcoding iommu/vt-d, trivial: clean sparse warnings
iommu/vt-d: free all resources if failed to initialize DMARs

 drivers/iommu/dmar.c                |  137 +++++++++++++--------
 drivers/iommu/intel-iommu.c         |  232 ++++++++++++++---------------------
 drivers/iommu/intel_irq_remapping.c |   98 +++++++--------
 drivers/iommu/irq_remapping.c       |    6 +-
 include/linux/dma_remapping.h       |    4 -
 include/linux/dmar.h                |   17 +--
 include/linux/intel-iommu.h         |    3 +-
 7 files changed, 229 insertions(+), 268 deletions(-)
Signature · 1 line
1.7.10.4