diff options
author | John Levon <john.levon@nutanix.com> | 2021-04-15 18:45:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-15 18:45:14 +0100 |
commit | c0fcc59abead719b2c983934905a6c3ecd0522b6 (patch) | |
tree | f58736ea6facad03c208f99a8e5c136819e2c211 /lib | |
parent | f7e9ff4496cc53caf8217b6210e29628ec60561d (diff) | |
download | libvfio-user-c0fcc59abead719b2c983934905a6c3ecd0522b6.zip libvfio-user-c0fcc59abead719b2c983934905a6c3ecd0522b6.tar.gz libvfio-user-c0fcc59abead719b2c983934905a6c3ecd0522b6.tar.bz2 |
remove vfu_get_region_info() (#444)
This is only used internally, and not really useful.
Signed-off-by: John Levon <john.levon@nutanix.com>
Reviewed-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libvfio-user.c | 7 | ||||
-rw-r--r-- | lib/pci.c | 7 | ||||
-rw-r--r-- | lib/private.h | 3 |
3 files changed, 3 insertions, 14 deletions
diff --git a/lib/libvfio-user.c b/lib/libvfio-user.c index 03ef6da..a0f6fe3 100644 --- a/lib/libvfio-user.c +++ b/lib/libvfio-user.c @@ -1497,13 +1497,6 @@ vfu_setup_device_migration_callbacks(vfu_ctx_t *vfu_ctx, return 0; } -vfu_reg_info_t * -vfu_get_region_info(vfu_ctx_t *vfu_ctx) -{ - assert(vfu_ctx != NULL); - return vfu_ctx->reg_info; -} - int vfu_addr_to_sg(vfu_ctx_t *vfu_ctx, vfu_dma_addr_t dma_addr, size_t len, dma_sg_t *sg, int max_sg, int prot) @@ -48,12 +48,11 @@ pci_hdr_write_bar(vfu_ctx_t *vfu_ctx, uint16_t bar_index, const char *buf) { uint32_t cfg_addr; unsigned long mask; - vfu_reg_info_t *reg_info = vfu_get_region_info(vfu_ctx); vfu_pci_hdr_t *hdr; assert(vfu_ctx != NULL); - if (reg_info[bar_index].size == 0) { + if (vfu_ctx->reg_info[bar_index].size == 0) { return; } @@ -64,10 +63,10 @@ pci_hdr_write_bar(vfu_ctx_t *vfu_ctx, uint16_t bar_index, const char *buf) vfu_log(vfu_ctx, LOG_DEBUG, "BAR%d addr 0x%x", bar_index, cfg_addr); if (cfg_addr == 0xffffffff) { - cfg_addr = ~(reg_info[bar_index].size) + 1; + cfg_addr = ~(vfu_ctx->reg_info[bar_index].size) + 1; } - if ((reg_info[bar_index].flags & VFU_REGION_FLAG_MEM)) { + if ((vfu_ctx->reg_info[bar_index].flags & VFU_REGION_FLAG_MEM)) { mask = PCI_BASE_ADDRESS_MEM_MASK; } else { mask = PCI_BASE_ADDRESS_IO_MASK; diff --git a/lib/private.h b/lib/private.h index 64780ce..102fdcd 100644 --- a/lib/private.h +++ b/lib/private.h @@ -145,9 +145,6 @@ dump_buffer(const char *prefix, const char *buf, uint32_t count); int consume_fd(int *fds, size_t nr_fds, size_t index); -vfu_reg_info_t * -vfu_get_region_info(vfu_ctx_t *vfu_ctx); - int dev_get_reginfo(vfu_ctx_t *vfu_ctx, uint32_t index, uint32_t argsz, struct vfio_region_info **vfio_reg, int **fds, size_t *nr_fds); |