[v2,0/2] iommu/vt-d: Introduce rbtree for probed devices

Message ID 20240220065939.121116-1-baolu.lu@linux.intel.com
Headers
Series iommu/vt-d: Introduce rbtree for probed devices |

Message

Baolu Lu Feb. 20, 2024, 6:59 a.m. UTC
  This is a follow-up to the discussion thread here:

https://lore.kernel.org/linux-iommu/20240201193427.GQ50608@ziepe.ca/

This proposes a per-IOMMU red-black tree for iommu probed devices. It
benefits fault handling paths, where the VT-d hardware reports the
Source ID of the related device, and software needs to retrieve the
corresponding device pointer based on this ID.

This is also available at github:

https://github.com/LuBaolu/intel-iommu/commits/rbtree-for-device-info-v2

Change log:

v2:
 - Drop get/put_device() in device_rbtree_find();
 - Add a mutex to synchronize iopf report and device release paths.

v1: https://lore.kernel.org/linux-iommu/20240215072249.4465-1-baolu.lu@linux.intel.com/

Lu Baolu (2):
  iommu/vt-d: Use rbtree to track iommu probed devices
  iommu/vt-d: Use device rbtree in iopf reporting path

 drivers/iommu/intel/iommu.h | 10 ++++
 drivers/iommu/intel/dmar.c  |  4 +-
 drivers/iommu/intel/iommu.c | 91 ++++++++++++++++++++++++++++++++++++-
 drivers/iommu/intel/svm.c   | 17 +++----
 4 files changed, 111 insertions(+), 11 deletions(-)
  

Comments

Baolu Lu Feb. 26, 2024, 6:15 a.m. UTC | #1
On 2/20/24 2:59 PM, Lu Baolu wrote:
> This is a follow-up to the discussion thread here:
> 
> https://lore.kernel.org/linux-iommu/20240201193427.GQ50608@ziepe.ca/
> 
> This proposes a per-IOMMU red-black tree for iommu probed devices. It
> benefits fault handling paths, where the VT-d hardware reports the
> Source ID of the related device, and software needs to retrieve the
> corresponding device pointer based on this ID.
> 
> This is also available at github:
> 
> https://github.com/LuBaolu/intel-iommu/commits/rbtree-for-device-info-v2
> 
> Change log:
> 
> v2:
>   - Drop get/put_device() in device_rbtree_find();
>   - Add a mutex to synchronize iopf report and device release paths.
> 
> v1:https://lore.kernel.org/linux-iommu/20240215072249.4465-1-baolu.lu@linux.intel.com/
> 
> Lu Baolu (2):
>    iommu/vt-d: Use rbtree to track iommu probed devices
>    iommu/vt-d: Use device rbtree in iopf reporting path

Above queued for v6.9.

Best regards,
baolu