summaryrefslogtreecommitdiffstats
path: root/hw/pci.h
diff options
context:
space:
mode:
authorIsaku Yamahata <yamahata@valinux.co.jp>2010-06-23 16:15:26 +0900
committerBlue Swirl <blauwirbel@gmail.com>2010-07-11 20:00:53 +0300
commit6fa84913eccec4266a27c81ae88465f6790742b9 (patch)
tree3a599d136b179f7ef25b54f18533385601e37c32 /hw/pci.h
parent520128bde824d208c0309bcfcdd6ffc4eb450099 (diff)
downloadhqemu-6fa84913eccec4266a27c81ae88465f6790742b9.zip
hqemu-6fa84913eccec4266a27c81ae88465f6790742b9.tar.gz
pci: insert assert that auto-assigned-address function is single function device.
Auto-assigned-address pci function (passing devfn = -1) is always single function. This patch adds assert() to guarantee that auto-assigned-address function is always single function device at function = 0. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw/pci.h')
-rw-r--r--hw/pci.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/pci.h b/hw/pci.h
index 3a15bd4..68d5c4e 100644
--- a/hw/pci.h
+++ b/hw/pci.h
@@ -14,6 +14,7 @@
#define PCI_DEVFN(slot, func) ((((slot) & 0x1f) << 3) | ((func) & 0x07))
#define PCI_SLOT(devfn) (((devfn) >> 3) & 0x1f)
#define PCI_FUNC(devfn) ((devfn) & 0x07)
+#define PCI_FUNC_MAX 8
/* Class, Vendor and Device IDs from Linux's pci_ids.h */
#include "pci_ids.h"
OpenPOWER on IntegriCloud