diff options
author | Joerg Roedel <jroedel@suse.de> | 2014-10-02 05:50:25 -0400 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2014-10-02 06:12:25 -0400 |
commit | 57384592c43375d2c9a14d82aebbdc95fdda9e9d (patch) | |
tree | ee31cf5f8d306c0bddd5ae2cf96c6b5d2b556979 | |
parent | 1196c2fb0407683c2df92d3d09f9144d42830894 (diff) |
iommu/vt-d: Store bus information in RMRR PCI device path
This will be used later to match broken RMRR entries.
Signed-off-by: Joerg Roedel <jroedel@suse.de>
-rw-r--r-- | drivers/iommu/dmar.c | 1 | ||||
-rw-r--r-- | include/linux/dmar.h | 8 |
2 files changed, 8 insertions, 1 deletions
diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c index 8ed55b0a1ce4..68da1ab0f2cd 100644 --- a/drivers/iommu/dmar.c +++ b/drivers/iommu/dmar.c | |||
@@ -155,6 +155,7 @@ dmar_alloc_pci_notify_info(struct pci_dev *dev, unsigned long event) | |||
155 | if (event == BUS_NOTIFY_ADD_DEVICE) { | 155 | if (event == BUS_NOTIFY_ADD_DEVICE) { |
156 | for (tmp = dev; tmp; tmp = tmp->bus->self) { | 156 | for (tmp = dev; tmp; tmp = tmp->bus->self) { |
157 | level--; | 157 | level--; |
158 | info->path[level].bus = tmp->bus->number; | ||
158 | info->path[level].device = PCI_SLOT(tmp->devfn); | 159 | info->path[level].device = PCI_SLOT(tmp->devfn); |
159 | info->path[level].function = PCI_FUNC(tmp->devfn); | 160 | info->path[level].function = PCI_FUNC(tmp->devfn); |
160 | if (pci_is_root_bus(tmp->bus)) | 161 | if (pci_is_root_bus(tmp->bus)) |
diff --git a/include/linux/dmar.h b/include/linux/dmar.h index 1deece46a0ca..593fff99e6bf 100644 --- a/include/linux/dmar.h +++ b/include/linux/dmar.h | |||
@@ -56,13 +56,19 @@ struct dmar_drhd_unit { | |||
56 | struct intel_iommu *iommu; | 56 | struct intel_iommu *iommu; |
57 | }; | 57 | }; |
58 | 58 | ||
59 | struct dmar_pci_path { | ||
60 | u8 bus; | ||
61 | u8 device; | ||
62 | u8 function; | ||
63 | }; | ||
64 | |||
59 | struct dmar_pci_notify_info { | 65 | struct dmar_pci_notify_info { |
60 | struct pci_dev *dev; | 66 | struct pci_dev *dev; |
61 | unsigned long event; | 67 | unsigned long event; |
62 | int bus; | 68 | int bus; |
63 | u16 seg; | 69 | u16 seg; |
64 | u16 level; | 70 | u16 level; |
65 | struct acpi_dmar_pci_path path[]; | 71 | struct dmar_pci_path path[]; |
66 | } __attribute__((packed)); | 72 | } __attribute__((packed)); |
67 | 73 | ||
68 | extern struct rw_semaphore dmar_global_lock; | 74 | extern struct rw_semaphore dmar_global_lock; |