Skip to content

Commit 5738459

Browse files
committed
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 <[email protected]>
1 parent 1196c2f commit 5738459

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

drivers/iommu/dmar.c

+1
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ dmar_alloc_pci_notify_info(struct pci_dev *dev, unsigned long event)
155155
if (event == BUS_NOTIFY_ADD_DEVICE) {
156156
for (tmp = dev; tmp; tmp = tmp->bus->self) {
157157
level--;
158+
info->path[level].bus = tmp->bus->number;
158159
info->path[level].device = PCI_SLOT(tmp->devfn);
159160
info->path[level].function = PCI_FUNC(tmp->devfn);
160161
if (pci_is_root_bus(tmp->bus))

include/linux/dmar.h

+7-1
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,19 @@ struct dmar_drhd_unit {
5656
struct intel_iommu *iommu;
5757
};
5858

59+
struct dmar_pci_path {
60+
u8 bus;
61+
u8 device;
62+
u8 function;
63+
};
64+
5965
struct dmar_pci_notify_info {
6066
struct pci_dev *dev;
6167
unsigned long event;
6268
int bus;
6369
u16 seg;
6470
u16 level;
65-
struct acpi_dmar_pci_path path[];
71+
struct dmar_pci_path path[];
6672
} __attribute__((packed));
6773

6874
extern struct rw_semaphore dmar_global_lock;

0 commit comments

Comments
 (0)