pci: Add pci-testdev PCI bus test device
Cc: Thomas Huth <thuth@redhat.com>
Cc: Andrew Jones <drjones@redhat.com>
Cc: Peter Xu <peterx@redhat.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Message-Id: <aa209d81d593909bfaf89bb3a91ff7f33f8441a8.1478512824.git.agordeev@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
diff --git a/lib/pci.h b/lib/pci.h
index 9d96055..30f5381 100644
--- a/lib/pci.h
+++ b/lib/pci.h
@@ -43,6 +43,8 @@
extern void pci_bar_print(pcidevaddr_t dev, int bar_num);
extern void pci_dev_print_id(pcidevaddr_t dev);
+int pci_testdev(void);
+
/*
* pci-testdev is a driver for the pci-testdev qemu pci device. The
* device enables testing mmio and portio exits, and measuring their
@@ -51,7 +53,12 @@
#define PCI_VENDOR_ID_REDHAT 0x1b36
#define PCI_DEVICE_ID_REDHAT_TEST 0x0005
+/*
+ * pci-testdev supports at least three types of tests (via mmio and
+ * portio BARs): no-eventfd, wildcard-eventfd and datamatch-eventfd
+ */
#define PCI_TESTDEV_NUM_BARS 2
+#define PCI_TESTDEV_NUM_TESTS 3
struct pci_test_dev_hdr {
uint8_t test;