Skip to content

Commit

Permalink
iommu/vt-d: Handle PCI bridge RMRR device scopes in intel_iommu_get_r…
Browse files Browse the repository at this point in the history
…esv_regions

In the case the RMRR device scope is a PCI-PCI bridge, let's check
the device belongs to the PCI sub-hierarchy.

Fixes: 0659b8d ("iommu/vt-d: Implement reserved region get/put callbacks")

Signed-off-by: Eric Auger <[email protected]>
Reviewed-by: Lu Baolu <[email protected]>
Signed-off-by: Joerg Roedel <[email protected]>
  • Loading branch information
eauger authored and joergroedel committed Jun 12, 2019
1 parent e143fd4 commit 3855ba2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/iommu/intel-iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -5426,7 +5426,8 @@ static void intel_iommu_get_resv_regions(struct device *device,
struct iommu_resv_region *resv;
size_t length;

if (i_dev != device)
if (i_dev != device &&
!is_downstream_to_pci_bridge(device, i_dev))
continue;

length = rmrr->end_address - rmrr->base_address + 1;
Expand Down

0 comments on commit 3855ba2

Please sign in to comment.