aboutsummaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2020-11-16log message for bad bitmaps flagThanos Makatos1-0/+1
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-11-16validate argszThanos Makatos1-12/+19
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-11-16remove obsolete commentThanos Makatos1-6/+0
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-11-16check for short readsThanos Makatos1-0/+6
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-11-16Merge pull request #88 from tmakatos/drop-dup-recvThanos1-300/+182
eliminate duplicate recv(2) code
2020-11-16eliminate duplicate recv(2) codeThanos Makatos1-300/+182
Instead of having each command handler do its own recv(2) to receive the command, we do this once for all commands. This reduces the code a bit. Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-11-16use object libraries to build libmuserJohn Levon1-2/+5
Using target_link_libraries for libmuser meant that unused symbols - including all of the public API - were not brought into the target shared object. Use CMake's "object library" feature instead, which doesn't use intermediate archives and thus avoids this issue.
2020-11-13don't realloc when returng VFIO capsThanos Makatos1-56/+41
This is a relic of talking to muser.ko. Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-11-13move determining size of VFIO capabilities into separate functionThanos Makatos1-15/+21
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-11-13move receiving request into separate functionThanos Makatos1-20/+41
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-11-13move header validation into separate functionThanos Makatos1-13/+29
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-11-13VFIO_USER_F_DMA_REGION_MAPPABLE should be non-zeroJohn Levon1-1/+1
This is supposed to be a bitflag not a bit position.
2020-11-13drop VFIO directory structureThanos Makatos2-73/+12
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-11-13only allow accessing the migration region in stop-and-copy stateThanos Makatos1-1/+34
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-11-13fixes in migration iteration codeThanos Makatos1-25/+40
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-11-12Fix issues pointed by CFLAGS "-Wall -Werror -Wextra"Swapnil Ingle1-0/+2
Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
2020-11-12don't use CONCAT in cmake (#81)John Levon1-1/+1
CentOS 7's cmake 2.8.12.2 apparently doesn't support this.
2020-11-11Merge branch 'vfio-user'Thanos Makatos16-674/+3093
2020-11-11drop the kernel moduleThanos Makatos4-475/+158
vfio-user is on track to be accepted upstream, so we shouldn't need muser.ko. This patch removes it since keeping it in the source is a maintanance burden. The last version is stashed in https://github.com/nutanix/muser/tree/kmod. If there is a valid use case we can reconsider reinstating it. fixes #67 Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-11-11Merge branch 'master' into vfio-userThanos Makatos2-7/+10
Last merge before we drop muser.ko. Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-11-11don't check wrong region for honoring migration device stateThanos Makatos1-1/+1
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-11-05experimental support for running the device state and copy iteration protocolThanos Makatos3-6/+358
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-11-05don't assert when accessing region failsThanos Makatos1-1/+7
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-11-05don't free user memoryThanos Makatos1-0/+9
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-11-05add/fix some log messagesThanos Makatos1-16/+24
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-11-04fix compilation with gcc < 5John Levon1-3/+4
2020-11-03install vfio_user.hThanos Makatos1-1/+1
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-10-29support for live migration region and dirty page loggingThanos Makatos6-149/+641
This patch adds support for the live migration region and dirty page logging following VFIO. Live migration is NOT yet functional as handling accesses to the migration region is not yet implemented. Currenty the live migration region is fixed at index 9 simply for simplifying the implementation. Dirty page logging is simplified by requiring IOVA ranges to match exactly the entire IOVA range. Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-10-29fix typoThanos Makatos1-1/+1
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-10-29document ROUND_ macrosThanos Makatos1-0/+1
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-10-26don't use uninitilized variableThanos Makatos1-1/+1
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com> Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-10-26store conn_fd in lm_ctx when connecting using lm_ctx_try_attachThanos Makatos1-0/+2
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com> Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-10-22simplify copying file descriptorsThanos Makatos1-5/+2
Signed-off-by: Changpeng Liu changpeng.liu@intel.com Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-10-22include region header when replying to ↵Thanos Makatos1-7/+17
VFIO_USER_REGION_READ/VFIO_USER_REGION_WRITE Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-10-22don't double-free memoryThanos Makatos1-4/+2
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-10-22don't require directory to be a numberThanos Makatos1-7/+0
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-10-22reindent using spacesThanos Makatos1-37/+37
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-10-20add vim modelineThanos Makatos1-0/+2
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-10-20remove unused function send_responseThanos Makatos1-16/+0
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-10-19Fix LM_FLAG_ATTACH_NB commentsSwapnil Ingle2-6/+6
Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
2020-10-19Revert "libmuser: Try to attach device for non-block ctx"Swapnil Ingle2-7/+8
This reverts commit 435acf689f4ec5c199fff9c3fe4057de8bba02ce. Caller must always call lm_ctx_try_attach(). SPDK expects this behaviour.
2020-10-16libmuser: Try to attach device for non-block ctxSwapnil Ingle2-8/+7
Quick try to attach device while lm_create_ctx with LM_FLAG_ATTACH_NB Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
2020-10-15libmuser: Block instead of spinning in recv_retrySwapnil Ingle1-8/+14
Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
2020-10-15libmuser: retry recv() when retured EAGAIN or EINTRSwapnil Ingle1-3/+14
Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
2020-10-07Implementation of VFIO_USER_DEVICE_RESETSwapnil Ingle1-5/+21
Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
2020-10-07lm_irq_trigger(): Arg name in sync with declerationSwapnil Ingle1-6/+7
Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
2020-10-07Implementation of VFIO_USER_VM_INTERRUPTSwapnil Ingle3-3/+58
Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
2020-10-05libmuser: Add support for VFIO_USER_DMA_READ and VFIO_USER_DMA_WRITESwapnil Ingle3-2/+92
Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
2020-10-05dma: add api to validate dma regionSwapnil Ingle2-0/+21
Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
2020-10-01add test for VFIO_USER_DEVICE_GET_REGION_INFOSwapnil Ingle1-2/+2
Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>