Age | Commit message (Collapse) | Author | Files | Lines |
|
This is useful when using another log function from the log function callback.
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>
|
|
When PCI_COMMAND interrupt disable bit set to 1, it means
disable the pin-based INTx interrupt.
For NVMe controller, it will use INTx first, and then switch
to MSIX, the interrupt vector 0 is both valid for INTx and
MSIX, so here we remove the check when posting an interrupt,
just check the interrupt fd is valid or not.
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
(cherry picked from commit 8ab7ca7d04365a7c39cd12ea45f8b9f7fa0afd47)
|
|
This is required for using multiple controllers in SPDK.
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
|
|
|
|
The parent directories must exist and the last component must be the
IOMMU group.
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
|
|
SPDK has a hard time running as non-root. This is a temporary hack.
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
|
|
This avoids problems with cgroups.
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
|
|
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
|
|
This helps reduce noise and debugging.
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
|
|
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
|
|
This simplifies callers of lm_log who use errno.
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>
|
|
The fd might come from another process so it doesn't make sense, the IOVA range
alone is sufficient to determine the DMA region to unmap.
Also, don't fail unmapping DMA regions that don't exist. Maybe we should revisit
this and ignore the error at the client side?
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>
|
|
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.
|
|
|