Commit 3855ba2d authored by Eric Auger's avatar Eric Auger Committed by Joerg Roedel

iommu/vt-d: Handle PCI bridge RMRR device scopes in intel_iommu_get_resv_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: 0659b8dc ("iommu/vt-d: Implement reserved region get/put callbacks")
Signed-off-by: default avatarEric Auger <eric.auger@redhat.com>
Reviewed-by: default avatarLu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent e143fd45
...@@ -5426,7 +5426,8 @@ static void intel_iommu_get_resv_regions(struct device *device, ...@@ -5426,7 +5426,8 @@ static void intel_iommu_get_resv_regions(struct device *device,
struct iommu_resv_region *resv; struct iommu_resv_region *resv;
size_t length; size_t length;
if (i_dev != device) if (i_dev != device &&
!is_downstream_to_pci_bridge(device, i_dev))
continue; continue;
length = rmrr->end_address - rmrr->base_address + 1; length = rmrr->end_address - rmrr->base_address + 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment