aboutsummaryrefslogtreecommitdiff
path: root/lib/pci.h
diff options
context:
space:
mode:
authorJohn Levon <john.levon@nutanix.com>2021-01-07 19:55:44 +0000
committerGitHub <noreply@github.com>2021-01-07 19:55:44 +0000
commit6ec31642f6253f5c19187c1ffb396d5921138b67 (patch)
tree9dd88104b0d56e63a83a48efbec6887cafc26730 /lib/pci.h
parent70524c550322948765415d9b0eb29ac766e32e79 (diff)
downloadlibvfio-user-6ec31642f6253f5c19187c1ffb396d5921138b67.zip
libvfio-user-6ec31642f6253f5c19187c1ffb396d5921138b67.tar.gz
libvfio-user-6ec31642f6253f5c19187c1ffb396d5921138b67.tar.bz2
re-work access handling (#220)
Various cleanups and fixes to handling of region accesses, including: - there should be no reason for us to split accesses into 1/2/4/8 byte accesses: in general, the client will have already be doing that, and if not, there's no particular reason we should be the ones to split up such larger accesses. - use a callback for PCI config space reads and writes if one is provided (needs more work for capabilities) Signed-off-by: John Levon <john.levon@nutanix.com> Reviewed-by: Swapnil Ingle <swapnil.ingle@nutanix.com> Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
Diffstat (limited to 'lib/pci.h')
-rw-r--r--lib/pci.h11
1 files changed, 0 insertions, 11 deletions
diff --git a/lib/pci.h b/lib/pci.h
index 8678902..b38b12b 100644
--- a/lib/pci.h
+++ b/lib/pci.h
@@ -36,17 +36,6 @@
#include "libvfio-user.h"
#include "private.h"
-static inline bool
-pci_is_hdr_access(uint64_t pos)
-{
- const uint64_t off = region_to_offset(VFU_PCI_DEV_CFG_REGION_IDX);
- return pos >= off && pos - off < PCI_STD_HEADER_SIZEOF;
-}
-
-int
-pci_hdr_access(vfu_ctx_t *vfu_ctx, uint32_t *count,
- uint64_t *pos, bool is_write, char *buf);
-
ssize_t
pci_config_space_access(vfu_ctx_t *vfu_ctx, char *buf, size_t count,
loff_t pos, bool is_write);