#include "pci.h"
#include "pci/header.h"
#include "pci/pci.h"
+#include "exec-all.h"
/* Log acesss */
#define PT_LOGGING_ENABLED
#ifdef PT_LOGGING_ENABLED
-#define PT_LOG(_f, _a...) fprintf(stdout, "%s: " _f, __func__, ##_a)
+#define PT_LOG(_f, _a...) fprintf(logfile, "%s: " _f, __func__, ##_a)
#else
#define PT_LOG(_f, _a...)
#endif
#define PCI_CAP_ID_MSI 0x05 /* Message Signalled Interrupts */
#define PCI_CAP_ID_MSIX 0x11 /* MSI-X */
+#ifndef PCI_MSI_FLAGS
+
/* Message Signalled Interrupts registers */
#define PCI_MSI_FLAGS 2 /* Various flags */
#define PCI_MSI_FLAGS_64BIT 0x80 /* 64-bit addresses allowed */
#define PCI_MSI_DATA_32 8 /* 16 bits of data for 32-bit devices */
#define PCI_MSI_DATA_64 12 /* 16 bits of data for 64-bit devices */
+#endif
+
/* MSI-X */
#define PCI_MSIX_ENABLE 0x8000
#define PCI_MSIX_MASK 0x4000