Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
|
|
|
|
vfio-user is on track to be accepted upstream, so we shouldn't need muser.ko.
This patch removes it since keeping it in the source is a maintanance burden.
The last version is stashed in https://github.com/nutanix/muser/tree/kmod. If
there is a valid use case we can reconsider reinstating it.
fixes #67
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
|
|
This fixes vfio.diff to apply cleanly on Linux 5.8 and renames
vm_insert_pages to _vm_insert_pages because an upstream function of the
same name has been added to the kernel since. Future work will include
replacing our version of vm_insert_pages with the upstream and redo all
necessary testing.
We also update travis to use v5.8.
Signed-off-by: Felipe Franciosi <felipe@nutanix.com>
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>
|
|
This is required for restartable device emulation.
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 problem of not receiving a DMA unmap looks like it will be solved by having
VFIO send us the DMA unmap even if we haven't called vfio_pin_pages, so instead
of failing for regions we haven't mapped (e.g. non-shared regions) we simply
ignore that operation.
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>
|
|
The muser print macro automatically inserts a new line.
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
|
|
This is a struct private to muser.
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>
|
|
Otherwise kmalloc can fail to allocate memory for larger guest VM RAM (>= 3GB).
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
|
|
Grab the module reference if mudev is opened from vfio side.
We need to protect module unloads if,
1> mudev is opened by qemu
2> mudev is opened by device emulation
Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
|
|
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>
|
|
Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
|
|
When the application close(muser_control_dev), do not destroy the
DMA_MAP information.
Reasons:
- Application should be able to connect back to DMA_MAP's.
- Qemu(vfio-client) is not aware when the DMA_MAP is destroyed.
Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
|
|
Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
|
|
Fix the return values type
|
|
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>
|
|
1> Use errno for the failures
2> Use signed types for the returned variables
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>
|
|
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
|
|
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>
|
|
Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
|
|
Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
|
|
_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>
|
|
Remove various spurious whitespaces and empty lines. Some other
alignment issues, too.
Signed-off-by: Felipe Franciosi <felipe@nutanix.com>
|
|
|
|
|
|
Need to explain why.
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>
|