qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [V12 1/4] hw/pci: Prepare for AMD IOMMU


From: David Kiarie
Subject: [Qemu-devel] [V12 1/4] hw/pci: Prepare for AMD IOMMU
Date: Wed, 15 Jun 2016 15:21:49 +0300

Introduce PCI macros from linux headers for use by AMD IOMMU

Signed-off-by: David Kiarie <address@hidden>
---
 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]