Age | Commit message (Collapse) | Author | Files | Lines |
|
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>
|
|
fixes #47
Signed-off-by: Thanos Makatos <thanos.makatos@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>
|
|
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>
|
|
Cleanup
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
It wasn't on the right place...
Signed-off-by: Felipe Franciosi <felipe@nutanix.com>
|
|
Some guards were missing, others were misaligned.
Signed-off-by: Felipe Franciosi <felipe@nutanix.com>
|
|
Several files were missing license headers.
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>
|
|
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
|
|
total number of bytes read
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
|
|
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>
|
|
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>
|