diff options
author | John Levon <john.levon@nutanix.com> | 2021-01-07 19:55:44 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-07 19:55:44 +0000 |
commit | 6ec31642f6253f5c19187c1ffb396d5921138b67 (patch) | |
tree | 9dd88104b0d56e63a83a48efbec6887cafc26730 /lib/pci.h | |
parent | 70524c550322948765415d9b0eb29ac766e32e79 (diff) | |
download | libvfio-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.h | 11 |
1 files changed, 0 insertions, 11 deletions
@@ -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); |