aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2019-09-27print offset of bad access to capabilities using hexThanos Makatos1-1/+1
All other prints for offset use hex, so let's make it consistent. Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-27make debug logging more configurableThanos Makatos3-0/+20
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-27add more debug messages when handling interruptsThanos Makatos1-0/+21
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-27add more debug messages in muser.koThanos Makatos1-2/+13
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-27fix typo in commentThanos Makatos1-1/+1
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-27make function muser_read staticThanos Makatos1-2/+2
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-27add TODOThanos Makatos1-0/+4
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-27add MSI-X capability headerThanos Makatos1-0/+70
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-27add some function documentationThanos Makatos2-0/+14
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-27fix order of MSI capability id and nextThanos Makatos1-1/+1
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-27add FIXME regarding enabling DEBUG in kernel moduleThanos Makatos1-0/+1
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-27add FIXME commentThanos Makatos1-0/+4
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-20remove unnecessary initialization of global pointerThanos Makatos1-1/+1
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-20stylistic correctionsThanos Makatos1-5/+4
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-20remove unused includeThanos Makatos1-1/+0
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-20remove unnecessary space around double #Thanos Makatos1-1/+1
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-20fix coding style violation rergarding curly bracketThanos Makatos1-34/+17
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-20don't unnecessarily initialize global variables to 0Thanos Makatos1-2/+2
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-20fix header orderThanos Makatos1-1/+2
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-20add license headerThanos Makatos1-0/+29
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-20add license header to files related to Python bindingsThanos Makatos3-0/+90
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-20experimental support for Python bindings plus sampleThanos Makatos6-0/+275
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-20update documentation on how to buildThanos Makatos1-10/+4
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-10Merge pull request #8 from franciozzy/masterFelipe Franciosi1-21/+26
Improve README overview section
2019-09-05Improve README overview sectionFelipe Franciosi1-21/+26
2019-09-05Minor style fixesFelipe Franciosi4-50/+39
2019-09-05Clarifications around mucmd_mmapFelipe Franciosi3-68/+51
2019-09-05remove unnecessary loop for retrieving regionThanos Makatos4-27/+24
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-05destory context in lm_ctx_runThanos Makatos1-3/+7
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-05don't hardcode default PCI config space sizeThanos Makatos1-1/+1
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-05fix typoThanos Makatos1-1/+1
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-05don't hardcode region shiftThanos Makatos1-1/+3
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-05use numerical steps in example explanationThanos Makatos1-21/+21
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-05use numerical steps in example explanationThanos Makatos1-4/+3
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-05introduce gpio sampleThanos Makatos3-1/+77
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-05use default values for PCI config region if none specifiedThanos Makatos1-0/+12
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-05fix offset to (region ID) * (1 << 40)Thanos Makatos4-11/+16
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-05set IPIN if interrupts are used in dev_infoThanos Makatos1-2/+5
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-05introduce convenience function lm_ctx_runThanos Makatos2-6/+16
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-05log debug message when reset called w/o callbackThanos Makatos1-0/+2
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-05specify subsystem and subsystem vendor ID in dev_infoThanos Makatos2-6/+9
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-05log debug messages when configuring IRQ failsThanos Makatos1-2/+15
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-05log debug message when ILINE is modifiedThanos Makatos1-0/+1
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-05fix offset and size argument order in failed accessThanos Makatos1-2/+2
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-05log error message when region w/o callback is accessedThanos Makatos1-0/+2
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-05fix error message for bad readThanos Makatos1-1/+1
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-05muser, libmuser: make libmuser_{read,write} consistentSwapnil Ingle2-31/+8
Currently muser/libmuser_write() expects mucmd as buffer, while muser/libmuser_read() expects data buffer. We arleady have the mucmd in mudev->pending, so make muser/libmuser_write() to take data buffer instead of mucmd. This way libmuser_{read,write} are consistent and we do not use mucmd sent by user. Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
2019-09-05muser: fix libmuser_mmap_dev()Swapnil Ingle1-1/+2
--Fix addr passed to vm_insert_page() The addr passed to vm_insert_page() should start from vm_start and incremented by PAGE_SIZE hence 'i' must be used in the calculation and not cur_pgidx(which is the index to fond the page) --Add new pages index to new_pgs new_pgs[] is an array of newly allocated pages, it is used for the cleanup in case of failure. It must be populated by the page_index of new allocated pages. Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
2019-09-05make doc re: error return val more readableThanos Makatos1-3/+3
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-05rename dma_scattergather_t to dma_sg_t to improve readabilityThanos Makatos4-16/+16
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>