aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
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>
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-07client, server changes for VFIO_USER_DEVICE_RESETSwapnil Ingle2-0/+21
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-07client, server changes for lm_irq_message()Swapnil Ingle2-2/+31
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-05Add test for VFIO_USER_DMA_READ and VFIO_USER_DMA_WRITESwapnil Ingle3-20/+236
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 Ingle2-3/+27
Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
2020-10-01remove extra new line char from the logsSwapnil Ingle1-2/+2
Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
2020-09-30client: better output messagesSwapnil Ingle1-3/+3
Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
2020-09-30Fix the copy logic of sparse areasSwapnil Ingle1-6/+9
Also added some better logs messages Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
2020-09-30Fix error return from dev_get_sparse_mmap_cap()Swapnil Ingle1-12/+10
Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
2020-09-29client: reviewed get_device_region_info()Swapnil Ingle1-20/+13
Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
2020-09-29Implementation of VFIO_USER_DEVICE_GET_REGION_INFOSwapnil Ingle2-37/+168
WIP: test sparse capability and add sample test for it Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
2020-09-29Keep client dev_info for further useSwapnil Ingle1-9/+8
Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
2020-09-29implement VFIO_USER_REGION_READ/VFIO_USER_REGION_WRITEThanos Makatos3-31/+180
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-09-29fix typoThanos Makatos1-1/+1
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-09-29remove unnecessary pause from sample clientThanos Makatos1-2/+0
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-09-29remove unused function map_dma from sample clientThanos Makatos1-6/+0
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-09-29introduce convinience function send_recv_vfio_user_msgThanos Makatos3-53/+44
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-09-28implement VFIO_USER_DEVICE_SET_IRQSThanos Makatos5-41/+300
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>