aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
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-recvThanos2-300/+188
eliminate duplicate recv(2) code
2020-11-16Merge pull request #85 from nutanix/swapnili/masterswapnili3-17/+1
Makefile: Remove unused KDIR
2020-11-16Makefile: Remove unused KDIRSwapnil Ingle3-17/+1
Also remove kernel build from travis.yml Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
2020-11-16eliminate duplicate recv(2) codeThanos Makatos2-300/+188
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-13samples/server: don't complain for failure when device reaches stopped ↵Thanos Makatos1-1/+1
migration state 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-13remove kmod related filesThanos Makatos2-2020/+0
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 Ingle7-49/+56
Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
2020-11-12set CFLAGS "-Wall -Werror -Wextra" at top level dirSwapnil Ingle1-0/+3
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-12Merge pull request #52 from tmakatos/masterThanos28-955/+4579
merge vfio-user into master
2020-11-11Merge branch 'vfio-user'Thanos Makatos28-955/+4579
2020-11-11Merge pull request #75 from tmakatos/vfio-userThanos12-2856/+173
merge master into vfio-user and drop muser.ko
2020-11-11don't patch the kernelThanos Makatos1-1/+0
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-11-11drop the kernel moduleThanos Makatos10-2859/+163
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 Makatos3-7/+21
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 Makatos5-39/+629
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-11-02remove libparthtrap and libvfioThanos Makatos5-558/+0
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-10-29support for live migration region and dirty page loggingThanos Makatos8-210/+855
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-26samples/server: don't print invalid errno when failing to realize device ↵Thanos Makatos1-1/+2
emulation 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-22Merge pull request #66 from tmakatos/issues/63Thanos4-75/+88
include region access header in response of region read/write command, plus assorted fixes
2020-10-22samples/client: move VFIO_USER_REGION_READ/VFIO_USER_REGION_WRITE earlierThanos Makatos1-12/+12
It's better to have this test earlier in the code, before we have to manually trigger an IRQ, so that we can catch developement errors more easily. Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-10-22samples/client: also receive region_access response for region writeThanos Makatos1-3/+9
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-10-22include region header when replying to ↵Thanos Makatos2-8/+20
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-22samples/server: don't include errnor when printing error via err(3)Thanos Makatos1-2/+2
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-10-22samples/server: don't use err(3) if errno hasn't been setThanos Makatos1-2/+4
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>