From 940f06490c4ba6a6ac30026220c16588145184f0 Mon Sep 17 00:00:00 2001 From: John Levon Date: Mon, 24 May 2021 16:15:46 +0000 Subject: [PATCH] vfio-user: update for libvfio-user region offset API change Now, vfu_setup_region() must specify the region fd offset (which is always zero in our case). Signed-off-by: John Levon Change-Id: I10795d848a4c73ee9e1e78ea63776074401c4b17 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8022 Tested-by: SPDK CI Jenkins Community-CI: Mellanox Build Bot Reviewed-by: Changpeng Liu Reviewed-by: Ben Walker --- lib/nvmf/vfio_user.c | 10 +++++----- libvfio-user | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/nvmf/vfio_user.c b/lib/nvmf/vfio_user.c index dde650924..e0a9aeaba 100644 --- a/lib/nvmf/vfio_user.c +++ b/lib/nvmf/vfio_user.c @@ -1528,7 +1528,7 @@ vfio_user_dev_info_fill(struct nvmf_vfio_user_transport *vu_transport, } ret = vfu_setup_region(vfu_ctx, VFU_PCI_DEV_CFG_REGION_IDX, NVME_REG_CFG_SIZE, - access_pci_config, VFU_REGION_FLAG_RW, NULL, 0, -1); + access_pci_config, VFU_REGION_FLAG_RW, NULL, 0, -1, 0); if (ret < 0) { SPDK_ERRLOG("vfu_ctx %p failed to setup cfg\n", vfu_ctx); return ret; @@ -1537,11 +1537,11 @@ vfio_user_dev_info_fill(struct nvmf_vfio_user_transport *vu_transport, if (vu_transport->transport_opts.disable_mappable_bar0) { ret = vfu_setup_region(vfu_ctx, VFU_PCI_DEV_BAR0_REGION_IDX, NVME_REG_BAR0_SIZE, access_bar0_fn, VFU_REGION_FLAG_RW | VFU_REGION_FLAG_MEM, - NULL, 0, -1); + NULL, 0, -1, 0); } else { ret = vfu_setup_region(vfu_ctx, VFU_PCI_DEV_BAR0_REGION_IDX, NVME_REG_BAR0_SIZE, access_bar0_fn, VFU_REGION_FLAG_RW | VFU_REGION_FLAG_MEM, - sparse_mmap, 1, endpoint->fd); + sparse_mmap, 1, endpoint->fd, 0); } if (ret < 0) { @@ -1550,14 +1550,14 @@ vfio_user_dev_info_fill(struct nvmf_vfio_user_transport *vu_transport, } ret = vfu_setup_region(vfu_ctx, VFU_PCI_DEV_BAR4_REGION_IDX, PAGE_SIZE, - NULL, VFU_REGION_FLAG_RW, NULL, 0, -1); + NULL, VFU_REGION_FLAG_RW, NULL, 0, -1, 0); if (ret < 0) { SPDK_ERRLOG("vfu_ctx %p failed to setup bar 4\n", vfu_ctx); return ret; } ret = vfu_setup_region(vfu_ctx, VFU_PCI_DEV_BAR5_REGION_IDX, PAGE_SIZE, - NULL, VFU_REGION_FLAG_RW, NULL, 0, -1); + NULL, VFU_REGION_FLAG_RW, NULL, 0, -1, 0); if (ret < 0) { SPDK_ERRLOG("vfu_ctx %p failed to setup bar 5\n", vfu_ctx); return ret; diff --git a/libvfio-user b/libvfio-user index cfe990191..7443fbedd 160000 --- a/libvfio-user +++ b/libvfio-user @@ -1 +1 @@ -Subproject commit cfe9901919943f14961e1da1c4a823336ff79555 +Subproject commit 7443fbedd1f94288fbe0d3563b72c4938aa9ff2f