aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2019-11-08Integrate with Travis CIv0.1Felipe Franciosi2-0/+19
This adds a simple .travis.yml file for integration with Travis CI. It tries to build muser.git on a Ubuntu Bionic environment using the Linux kernel 5.2.21. Signed-off-by: Felipe Franciosi <felipe@nutanix.com>
2019-11-07enable -Wall, -Wextra, and -Werror and fix all warningsThanos Makatos9-47/+57
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-11-06Merge pull request #8 from swapnili/masterswapnili2-39/+28
Fix the return values type
2019-11-06Merge pull request #6 from tmakatos/masterThanos1-15/+31
fix compilations problems for kernel 4.19.67 plus clean up
2019-11-06muser, libmuser: Do not abuse muser_cmd.mmap.response to return errSwapnil Ingle2-22/+10
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-04Merge pull request #5 from swapnili/masterswapnili3-65/+64
general fixes and cleanup
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 Ingle2-15/+14
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-04Merge pull request #2 from franciozzy/cleanupFelipe Franciosi25-220/+395
Cleanup
2019-11-04Hide ERR/REQ IRQs from clientsFelipe Franciosi2-9/+4
Users of libmuser do not need to know about ERR/REQ IRQs. We can later plumb the correct support to fire REQ IRQs (for graceful removal of devices) via a dedicated method (if ever needed). Similarly we should offer a method to raise an ERR IRQ accordingly. Signed-off-by: Felipe Franciosi <felipe@nutanix.com>
2019-11-04Remove incorrect guards on dump_buffer()Felipe Franciosi1-2/+0
The dump_buffer() method has internal guards, causing the function to be optimised out (within a compilation unit) if DEBUG is not set. The guards around the function export are not needed. Signed-off-by: Felipe Franciosi <felipe@nutanix.com>
2019-11-04Standardise function signaturesFelipe Franciosi10-150/+173
This makes all function signatures consistent, using a line break after the return type. It also review the usage of const across the project and fixes some other minor alignment issues. Signed-off-by: Felipe Franciosi <felipe@nutanix.com>
2019-11-03Merge pull request #1 from stefanha/trivial-fixesFelipe Franciosi1-3/+3
Trivial spelling and grammar fixes
2019-11-02libmuser: grammar fix for lm_irq_trigger() doc commentsStefan Hajnoczi1-2/+2
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2019-11-02libmuser: fix 'hanlded' typoStefan Hajnoczi1-1/+1
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2019-11-02Add .gitignore fileFelipe Franciosi1-0/+2
Signed-off-by: Felipe Franciosi <felipe@nutanix.com>
2019-11-02Fix shell script shebangFelipe Franciosi1-1/+1
It wasn't on the right place... Signed-off-by: Felipe Franciosi <felipe@nutanix.com>
2019-11-02Fix various guard issuesFelipe Franciosi8-4/+27
Some guards were missing, others were misaligned. Signed-off-by: Felipe Franciosi <felipe@nutanix.com>
2019-11-02Add missing headersFelipe Franciosi4-0/+129
Several files were missing license headers. Signed-off-by: Felipe Franciosi <felipe@nutanix.com>
2019-11-02Fix various format issuesFelipe Franciosi15-58/+63
Remove various spurious whitespaces and empty lines. Some other alignment issues, too. Signed-off-by: Felipe Franciosi <felipe@nutanix.com>
2019-10-03libmuser: check pointers following coding styleFelipe Franciosi1-7/+7
Coding style says pointers should be explicitly checked.
2019-10-03samples: make test_read slightly more verboseFelipe Franciosi1-1/+2
This helped in debugging the recent config breakage.
2019-10-03Minor alignment fixesFelipe Franciosi2-12/+15
2019-10-03libmuser: add default noop_cb for config regionFelipe Franciosi1-1/+8
This got broken at some point and we missed it. If a device doesn't add capabilities then reading from the config region returns short and fails. Signed-off-by: Felipe Franciosi <felipe@nutanix.com>
2019-10-02Log mmap_dev at debug levelFelipe Franciosi1-3/+3
2019-09-27merge FIXME commentsThanos Makatos1-2/+0
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-27update comment regading using local variableThanos Makatos1-1/+1
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-27use local variable for clarityThanos Makatos1-6/+6
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-27fix typosThanos Makatos2-3/+4
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-27clarify usage of lm_irq_triggerThanos Makatos1-2/+5
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
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-27don't omit number of bytes read from the standard PCI header when returning ↵Thanos Makatos1-17/+22
total number of bytes read Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-27don't fail reads for capabilities that do not existThanos Makatos1-1/+1
Previously we failed reads for capabilities that do not exist, that is any read in region 0x40 and 0x100. It is s perfectly legitimate to read that part of the PCI config space even if there's nothing there, we just return zeros. 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-27don't trigger INTx IRQ if it's disabledThanos Makatos1-0/+15
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
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>