aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJohn Levon <john.levon@nutanix.com>2021-01-04 17:45:04 +0000
committerGitHub <noreply@github.com>2021-01-04 17:45:04 +0000
commit715b7963312002980b9eea5a695719cfdf2bf6e4 (patch)
tree2b8de738063dfd7fe1e87c87cb4821eca733aa13 /include
parent1e6e49b57e820301e336fe31176335f457a2e94d (diff)
downloadlibvfio-user-715b7963312002980b9eea5a695719cfdf2bf6e4.zip
libvfio-user-715b7963312002980b9eea5a695719cfdf2bf6e4.tar.gz
libvfio-user-715b7963312002980b9eea5a695719cfdf2bf6e4.tar.bz2
move PCI-specific code to pci.c (#219)
It's still pretty entangled, but move the bulk of the non-cap PCI code over to pci.c. Signed-off-by: John Levon <john.levon@nutanix.com> Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
Diffstat (limited to 'include')
-rw-r--r--include/CMakeLists.txt2
-rw-r--r--include/libvfio-user.h2
-rw-r--r--include/pci_defs.h (renamed from include/pci.h)8
3 files changed, 7 insertions, 5 deletions
diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt
index 07c6836..c209d6c 100644
--- a/include/CMakeLists.txt
+++ b/include/CMakeLists.txt
@@ -36,5 +36,5 @@ install(FILES "pci_caps/msi.h" DESTINATION ${VFIO_USER_HEADERS_DIR}/pci_caps)
install(FILES "pci_caps/msix.h" DESTINATION ${VFIO_USER_HEADERS_DIR}/pci_caps)
install(FILES "pci_caps/pm.h" DESTINATION ${VFIO_USER_HEADERS_DIR}/pci_caps)
install(FILES "pci_caps/px.h" DESTINATION ${VFIO_USER_HEADERS_DIR}/pci_caps)
-install(FILES "pci.h" DESTINATION ${VFIO_USER_HEADERS_DIR})
+install(FILES "pci_defs.h" DESTINATION ${VFIO_USER_HEADERS_DIR})
install(FILES "vfio-user.h" DESTINATION ${VFIO_USER_HEADERS_DIR})
diff --git a/include/libvfio-user.h b/include/libvfio-user.h
index f92e0cd..75878c1 100644
--- a/include/libvfio-user.h
+++ b/include/libvfio-user.h
@@ -43,7 +43,7 @@
#include <unistd.h>
#include <syslog.h>
-#include "pci.h"
+#include "pci_defs.h"
#include "pci_caps/pm.h"
#include "pci_caps/px.h"
#include "pci_caps/msi.h"
diff --git a/include/pci.h b/include/pci_defs.h
index 112becf..5a77b65 100644
--- a/include/pci.h
+++ b/include/pci_defs.h
@@ -30,8 +30,8 @@
*
*/
-#ifndef LIBVFIO_USER_PCI_H
-#define LIBVFIO_USER_PCI_H
+#ifndef LIBVFIO_USER_PCI_DEFS_H
+#define LIBVFIO_USER_PCI_DEFS_H
#include <stdint.h>
#include <stdbool.h>
@@ -42,6 +42,8 @@ extern "C" {
#endif
/*
+ * PCI standard header definitions.
+ *
* TODO lots of the sizes of each member are defined in pci_regs.h, use those
* instead?
*/
@@ -194,6 +196,6 @@ _Static_assert(sizeof(vfu_pci_config_space_t) == 0x100,
}
#endif
-#endif /* LIBVFIO_USER_PCI_H */
+#endif /* LIBVFIO_USER_PCI_DEFS_H */
/* ex: set tabstop=4 shiftwidth=4 softtabstop=4 expandtab: */