Age | Commit message (Collapse) | Author | Files | Lines |
|
For clarity and better project organisation towards unit tests, this
renames libmuser.c to muser_ctx.c and libmuser_pci.c to muser_pci.c.
CMakeLists is fixed accordingly including some other minor cleanup.
Future work should further split muser_ctx.c so that unit tests can
genuinely be written towards testing compilation units.
Signed-off-by: Felipe Franciosi <felipe@nutanix.com>
|
|
This should probably only be done for debug builds, and I don't think we need
to print the fd. I'm enabling it for now because this is a new feature so it's
good to have these messages until we're convinced it works properly.
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
|
|
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
|
|
This enables huge pages to work. Also, it avoids requiring having to pin memory.
The solution is not 100% correct because since we no longer call vfio_pin_pages,
VFIO doesn't send the DMA registration event and we end up getting duplicate
regions which we reject (this is because of our internal DMA bookkeeping
implementation). We need to work with the community to find a solution.
fixes #28
fixes #29
fixes #38
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
|
|
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
|
|
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
|
|
muser works only with DMA_MAP_FAST_IMPL, So no need
to support !DMA_MAP_FAST_IMPL implementation.
Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
|
|
fixes #10
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
|
|
Current state of lm_ctx_create is quite messy. This cleans it up
considerably, moving the pci config space creation to a separate helper.
It gets rid of the 'extended' bool from dev_info, meaning that a client
that wants to have a 4KiB config header should specify it on the
corresponding region.
This may all need reviewing later if we decide that other regions may be
always handled by libmuser, in which case we can hide config, vga (and
maybe rom?) entirely from our clients.
Signed-off-by: Felipe Franciosi <felipe@nutanix.com>
|
|
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>
|
|
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
|
|
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>
|
|
Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
|
|
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>
|
|
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>
|
|
Remove various spurious whitespaces and empty lines. Some other
alignment issues, too.
Signed-off-by: Felipe Franciosi <felipe@nutanix.com>
|
|
Coding style says pointers should be explicitly checked.
|
|
|
|
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>
|
|
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
|
|
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
|
|
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
|
|
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
|
|
total number of bytes read
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
|
|
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
|
|
All other prints for offset use hex, so let's make it consistent.
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
|
|
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
|
|
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
|
|
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
|
|
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
|
|
|
|
|
|
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
|
|
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
|
|
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
|
|
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
|
|
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
|
|
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
|
|
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
|
|
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
|
|
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
|
|
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
|
|
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
|
|
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
|
|
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
|
|
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
|
|
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
|
|
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>
|
|
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
|
|
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
|