aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-11-19refactor socket code into lib/tran_sock.[ch] (#97)John Levon12-749/+786
2020-11-18implement new negotiation implementationJohn Levon4-108/+254
Refactor for a partial re-implementation of initial vfio-user negotiation. Still needs to do the JSON parsing - in the meantime, hard-code the max_fds parameters we expect.
2020-11-18samples/server.c: add _GNU_SOURCE for aligned_alloc()John Levon1-0/+1
2020-11-18document how to run client/server sampleThanos Makatos1-0/+31
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-11-18implement migration resuming on destination serverThanos Makatos4-129/+476
This patch implements resuming on the destination server. We also demonstrate how to do this in the client/server sample. Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-11-18samples/server: replace fprintf(stdout, ...) with printf for simplicityThanos Makatos1-7/+7
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-11-18samples/client: use err/errx for simplicityThanos Makatos1-205/+119
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-11-18samples/server: use err/errx for simplicityThanos Makatos1-29/+17
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-11-18assorted fixesThanos Makatos1-14/+26
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-11-18don't swallow original reason why bind(2) failsThanos Makatos1-1/+2
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-11-18client/server sample: trigger IRQ based on alarmThanos Makatos2-74/+80
This avoid having to manually send USR1 to the server. Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-11-18remove commented out headerThanos Makatos1-1/+0
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-11-18don't assert on error, instead respond with the relevant bit setThanos Makatos3-6/+19
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-11-18small cleanups post-muser.ko removalJohn Levon5-14/+9
2020-11-18add a github-recognised LICENSE fileJohn Levon1-4/+27
Now we no longer have kernel code, we can explicitly use the github-recognised LICENSE text.
2020-11-18Merge pull request #92 from swapnili/masterswapnili10-707/+45
Cleanup and warning fixes
2020-11-17remove test_dma_map.c,test_mmap.c and test_read.cSwapnil Ingle4-682/+0
Those files were intended for kmod. No use for vfio-user. Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
2020-11-17Fix compiler errors for non-dbg buildSwapnil Ingle6-25/+45
Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
2020-11-16Merge pull request #90 from tmakatos/masterThanos2-18/+29
misc fixes
2020-11-16log message for bad bitmaps flagThanos Makatos1-0/+1
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-11-16validate argszThanos Makatos2-12/+22
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-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>