From: Eric Auger Date: Mon, 3 Jun 2019 06:53:34 +0000 (+0200) Subject: iommu/vt-d: Handle PCI bridge RMRR device scopes in intel_iommu_get_resv_regions X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=3855ba2d834d8f7727b7f992ff781fa66cc09f96;p=linux.git 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: 0659b8dc45a6 ("iommu/vt-d: Implement reserved region get/put callbacks") Signed-off-by: Eric Auger Reviewed-by: Lu Baolu Signed-off-by: Joerg Roedel --- diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 0d7d177673dda..5de48ed1f7632 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c @@ -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;