]> rtime.felk.cvut.cz Git - jailhouse.git/commitdiff
pci: ignore PCI bridge violations in Linux to allow bus rescans
authorHenning Schild <henning.schild@siemens.com>
Mon, 24 Nov 2014 17:54:07 +0000 (18:54 +0100)
committerJan Kiszka <jan.kiszka@siemens.com>
Tue, 25 Nov 2014 12:32:02 +0000 (13:32 +0100)
When adding new devices Linux will access the PCI root bridge. Introduce
a HACK that will ignore the access and not treat it as a violation.

Signed-off-by: Henning Schild <henning.schild@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
hypervisor/pci.c

index 37be1b544ddec30ae974e04ea929f95249e96d28..76b97bdd14ddcc7fa4646748be7ae076931f6774 100644 (file)
@@ -251,6 +251,11 @@ enum pci_access pci_cfg_write_moderate(struct pci_device *device, u16 address,
                                return PCI_ACCESS_PERFORM;
                }
 
+               // HACK to allow PCI bus rescanning in root-cell
+               if (device->info->type == JAILHOUSE_PCI_TYPE_BRIDGE &&
+                   device->cell == &root_cell)
+                       return PCI_ACCESS_DONE;
+
                return PCI_ACCESS_REJECT;
        }