aboutsummaryrefslogtreecommitdiff
path: root/kmod
AgeCommit message (Collapse)AuthorFilesLines
2019-11-06Merge pull request #8 from swapnili/masterswapnili1-27/+25
Fix the return values type
2019-11-06muser, libmuser: Do not abuse muser_cmd.mmap.response to return errSwapnil Ingle1-10/+7
muser_cmd.mmap.response is unsigned and should not be used to return errors, instead use muser_cmd.err Also fixed the code path to use valid errno values. Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
2019-11-06muser.c: Fix the return values of the functionsSwapnil Ingle1-20/+21
1> Use errno for the failures 2> Use signed types for the returned variables Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
2019-11-05remove obsolete comment, this is fixed by the IOMMU patchThanos Makatos1-2/+1
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-11-05rename obsolete 'PCI server' with libmuserThanos Makatos1-3/+3
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-11-05fix compilation for 4.19.67Thanos Makatos1-8/+25
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-11-05don't print page type when failing to add pageThanos Makatos1-2/+2
page_has_type() seems to be an internal function and it's not critically usefull anyway Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-11-04muser.c: code cleanup and coding style fixupsSwapnil Ingle1-49/+49
Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
2019-11-04muser.h: remove unused variable struct muser_cmd_rw.bufSwapnil Ingle1-1/+0
Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
2019-11-04muser.h: fix the ioctl definationSwapnil Ingle1-1/+1
_IOW means userland is writing and kernel is reading _IOR means userland is reading and kernel is writing MUSER_DEV_CMD_WAIT should be _IOR as userland waits to read cmd from kernel. Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
2019-11-02Fix various format issuesFelipe Franciosi2-3/+2
Remove various spurious whitespaces and empty lines. Some other alignment issues, too. Signed-off-by: Felipe Franciosi <felipe@nutanix.com>
2019-10-03Minor alignment fixesFelipe Franciosi1-7/+6
2019-10-02Log mmap_dev at debug levelFelipe Franciosi1-3/+3
2019-09-27ignore VFIO_IRQ_SET_DATA_NONEThanos Makatos1-0/+1
Need to explain why. Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-27return number of bytes actually provided by libmuserThanos Makatos1-5/+17
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-27log message in kernel when reading from libmuser failsThanos Makatos1-1/+6
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-27log message when not able to handle IRQ setThanos Makatos1-0/+15
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 FIXME regarding enabling DEBUG in kernel moduleThanos Makatos1-0/+1
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-05Minor style fixesFelipe Franciosi1-27/+16
2019-09-05Clarifications around mucmd_mmapFelipe Franciosi2-24/+17
2019-09-05muser, libmuser: make libmuser_{read,write} consistentSwapnil Ingle1-17/+1
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-05muser, libmuser: support vfio sparse mmap capabilitySwapnil Ingle1-11/+81
Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
2019-09-05move device mmap to per-region callbacksThanos Makatos2-4/+8
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-05Initial commitFelipe Franciosi3-0/+1928