Introduce PCI macros from linux headers for use by AMD IOMMU Signed-off-by: David Kiarie <davidkiar...@gmail.com> --- include/hw/pci/pci.h | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h index 4420f47..ac376c5 100644 --- a/include/hw/pci/pci.h +++ b/include/hw/pci/pci.h @@ -12,6 +12,8 @@ /* PCI bus */ +#define PCI_BUS_NUM(x) (((x) >> 8) & 0xff) +#define PCI_DEVID(bus, devfn) ((((uint16_t)(bus)) << 8) | (devfn)) #define PCI_DEVFN(slot, func) ((((slot) & 0x1f) << 3) | ((func) & 0x07)) #define PCI_SLOT(devfn) (((devfn) >> 3) & 0x1f) #define PCI_FUNC(devfn) ((devfn) & 0x07) -- 2.1.4