aboutsummaryrefslogtreecommitdiff
path: root/samples
AgeCommit message (Collapse)AuthorFilesLines
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-07client, server changes for VFIO_USER_DEVICE_RESETSwapnil Ingle2-0/+21
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-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-01add test for VFIO_USER_DEVICE_GET_REGION_INFOSwapnil Ingle1-1/+25
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-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 Ingle1-2/+73
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 Makatos2-21/+103
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 Makatos1-53/+19
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-09-28implement VFIO_USER_DEVICE_SET_IRQSThanos Makatos4-39/+249
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-09-28Fix handling of VFIO_USER_DEVICE_GET_INFOSwapnil Ingle1-3/+5
vfio_device_info.argsz is set by the client and server is expected to use/validate it. Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
2020-09-25implement VFIO_USER_DEVICE_GET_IRQ_INFOThanos Makatos1-17/+41
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-09-25implement VFIO_USER_DMA_UNMAPThanos Makatos1-7/+26
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-09-24implement VFIO_USER_DMA_MAPThanos Makatos2-41/+77
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-09-23Initial implementation of VFIO_USER_DEVICE_GET_INFOSwapnil Ingle1-0/+47
Initial client and server implementation of VFIO_USER_DEVICE_GET_INFO. Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
2020-09-23start handling MAP_DMA, FDs not yet receivedThanos Makatos1-33/+34
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-09-23refactor send/recv of message plus fixesThanos Makatos3-46/+80
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-08-12samples/test_dma_map: Style fixesFelipe Franciosi1-2/+2
Fixes the type used in a format string and remove some whitespaces. Signed-off-by: Felipe Franciosi <felipe@nutanix.com> Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
2020-07-20update gpio's command lineThanos Makatos1-1/+1
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-06pass log level to log functionThanos Makatos2-2/+2
This is useful when using another log function from the log function callback. Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-03-25trap SIGINT in gpio sampleThanos Makatos1-2/+26
This allows system calls to return if a signal is sent (e.g. SIGINT) in order to clean uo properly. Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-03-25introduce vfio-over-socket transportThanos Makatos1-3/+29
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-02-28add sample to test #47Thanos Makatos2-0/+111
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-02-25add test to repro issue #29Thanos Makatos2-0/+219
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-02-25gpio sample: print error message when device UUID is missingThanos Makatos1-4/+10
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-11-20print error if device emulation fails in GPIO sampleThanos Makatos1-1/+7
closes #15 Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-11-02Add missing headersFelipe Franciosi1-0/+33
Several files were missing license headers. Signed-off-by: Felipe Franciosi <felipe@nutanix.com>
2019-11-02Fix various format issuesFelipe Franciosi1-1/+1
Remove various spurious whitespaces and empty lines. Some other alignment issues, too. Signed-off-by: Felipe Franciosi <felipe@nutanix.com>
2019-10-03samples: make test_read slightly more verboseFelipe Franciosi1-1/+2
This helped in debugging the recent config breakage.
2019-09-20add license header to files related to Python bindingsThanos Makatos1-0/+29
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-20experimental support for Python bindings plus sampleThanos Makatos1-0/+8
This patch introduces experimental support for Python bindings, plus the GPIO sample in Python. There are many issues with extending Python (from module stuff to error handling), the most important one is the inability to modify the buf argument to the region access callbacks when a region is read from. For now I've resorted to returning the value since in libmuser we limit accesses to 8 bytes (maybe we should consider that for the C API as well?). Also, the fact that we don't pass the region being accessed as an argument to a region access callback results in clunky code (see the REGION_WRAP macro). Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-05introduce gpio sampleThanos Makatos2-0/+40
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-05sample/test_read: add test for sparse mmap capSwapnil Ingle1-13/+43
Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
2019-09-05Initial commitFelipe Franciosi3-0/+464