aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-09-23drop extraneous newline from some log messagesThanos Makatos1-3/+3
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-09-23drop newline from gpio logging functionThanos Makatos1-1/+1
libmuser always adds a newline Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-09-23refactor initializing socket and setting version into separate functionsThanos Makatos1-15/+37
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-09-23add simple client application for testing vfio-userThanos Makatos2-0/+114
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-09-23exchange vfio-user version with clientThanos Makatos1-1/+101
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-09-23don't assert on failure to initThanos Makatos1-2/+6
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-09-23return error code when failing to attachThanos Makatos1-8/+1
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-09-23add vfio-user version supported by libmuserThanos Makatos1-0/+3
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-09-23rename command to cmdThanos Makatos1-1/+1
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-09-23add missing headerThanos Makatos1-0/+1
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-09-23FIXME move vfio_user.h to correct locationThanos Makatos1-0/+0
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-09-23include vfio.h in vfio_user.hThanos Makatos1-0/+2
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-09-23add vfio_user.h to MakefileThanos Makatos2-0/+2
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-09-23fix attribute keywordThanos Makatos1-3/+3
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-09-23Add vfio_user.h from https://github.com/tmakatos/muser/pull/6Thanos Makatos1-0/+90
Signed-off-by: Changpeng Liu changpeng.liu@intel.com
2020-09-23Handle cleanup in init_socket for error outSwapnil Ingle1-35/+39
This patch adds cleanup during error out in init_socket. Also no need to create control socket path, bind() on AF_UNIX creates the path internally. Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
2020-09-17use correct socket fd in fcntlThanos Makatos1-1/+1
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com> Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-09-17don't reuse listening socket fd for connected socket fdThanos Makatos1-11/+12
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com> Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
2020-07-22add optional callback to notify context when DMA region is addedThanos Makatos2-0/+11
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-07-21focus README on VFIO-over-socketThanos Makatos1-81/+71
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-07-21change libvfio logging path to something more sensibleThanos Makatos1-1/+1
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-07-21make unmap_dma callback optionalThanos Makatos2-10/+34
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-07-20update gpio's command lineThanos Makatos1-1/+1
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-07-17update libpathtrapThanos Makatos1-0/+0
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-07-17refactor PCI capabilitiesThanos Makatos4-204/+140
This patch greatly refactors PCI capabilities. The main change is that we don't keep them in a list but simply store them in the PCI configuration space. Some corner cases aren't handled yet. It also fixes a bug where a capability isn't properly read depending on where it's located. Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-07-16add common definition for PCI capability headerThanos Makatos5-26/+58
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-07-15libpathtrap: fix compilation for gcc 10 / ld 2.34Thanos Makatos1-0/+0
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-07-15use HTTPS for libpathtrapThanos Makatos1-1/+1
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-07-15fix verbose loggingThanos Makatos4-53/+42
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-07-15handle PCI capabilities internallyThanos Makatos4-44/+344
Very few capabilities are handled, and implementation isn't great. Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-07-09minor improvements in non-blocking receive pathThanos Makatos1-15/+13
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-07-09Use MSG_DONTWAIT to receive requests if LM_FLAG_ATTACH_NB is specifiedBen Walker1-1/+18
If the user wanted non-blocking operation, don't block on the socket waiting for requests. Instead, use MSG_DONTWAIT to attempt to get the next request and return. The other operations all remain as blocking calls because they are not expected to ever need to wait. Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2020-07-09All transport operations now take an lm_ctx_t as an argumentBen Walker1-23/+36
This is both for consistency and because the socket transport is going to need some place to cache things to handle partial sends and receives. Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2020-07-08fix assertionThanos Makatos1-1/+1
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-07-08dma: notify device of DMA removal eventsThanos Makatos4-39/+106
This patch introduces a new device callback that is called when a DMA region is removed. The device must provide this callback and when the callback returns all references to the DMA regions must have been removed. This new functionality is necessary since a DMA region can be removed at any time, so the device must be given a chance to drop all references and perform the necessary cleanup. This patch also stores lm_ctx_t inside dma_controller_t so that we don't have to pass lm_ctx_t when calling dma_XXX functions. Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-07-08null device: add muser prefix in log callbackThanos Makatos1-1/+1
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-07-08Add lm_ctx_poll() as an alternative to lm_ctx_drive()Ben Walker2-53/+82
Using lm_ctx_poll() simply polls for work and returns instead of blocking. It is only valid when used on an lm_ctx created with LM_FLAG_ATTACH_NB. Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2020-07-08Drop __attribute__((packed))from struct lm_ctxBen Walker1-13/+4
This makes it unsafe to take pointers to addresses within this data structure, and lots of the code does that. Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2020-07-06pass log level to log functionThanos Makatos4-4/+4
This is useful when using another log function from the log function callback. Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-07-06don't leak caps when destroying LM contextThanos Makatos1-0/+1
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-07-03ignore VGA palette snoopingThanos Makatos1-0/+5
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-07-03handle memory write and invalidateThanos Makatos1-0/+13
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-06-24don't blindly trust region_hintThanos Makatos2-1/+6
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-06-23improve message when VFIO client closes connectionThanos Makatos1-1/+5
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-06-12muser: use the correct PCI_COMMAND interrupt disable(ID) bitChangpeng Liu2-15/+2
When PCI_COMMAND interrupt disable bit set to 1, it means disable the pin-based INTx interrupt. For NVMe controller, it will use INTx first, and then switch to MSIX, the interrupt vector 0 is both valid for INTx and MSIX, so here we remove the check when posting an interrupt, just check the interrupt fd is valid or not. Signed-off-by: Changpeng Liu <changpeng.liu@intel.com> (cherry picked from commit 8ab7ca7d04365a7c39cd12ea45f8b9f7fa0afd47)
2020-06-04work in progress to make attaching to the transport optionally non-blockingThanos Makatos2-24/+109
This is required for using multiple controllers in SPDK. Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-06-01let the control stack create IOMMU group symlink under /de/vfioThanos Makatos1-6/+0
2020-05-26FIXME loggingThanos Makatos1-1/+6
2020-05-26user arbitraty path for control filesThanos Makatos2-19/+20
The parent directories must exist and the last component must be the IOMMU group. Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-05-21allow non-root access to UNIX domain socketThanos Makatos1-4/+11
SPDK has a hard time running as non-root. This is a temporary hack. Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>