vfio-user: Implement sparse mmap capability for Server#132
Merged
likebreath merged 2 commits intorust-vmm:mainfrom Mar 2, 2026
Merged
vfio-user: Implement sparse mmap capability for Server#132likebreath merged 2 commits intorust-vmm:mainfrom
likebreath merged 2 commits intorust-vmm:mainfrom
Conversation
Manage the server socket better by removing the socket path when the server is dropped. Also, remove a possible leftover socket path when starting the server. Signed-off-by: Sebastien Boeuf <sboeuf@meta.com>
rbradford
reviewed
Feb 27, 2026
rbradford
approved these changes
Feb 27, 2026
6f3d6a5 to
6cc15bf
Compare
rbradford
approved these changes
Feb 27, 2026
likebreath
reviewed
Feb 27, 2026
Collaborator
likebreath
left a comment
There was a problem hiding this comment.
LGTM. Just one nit below.
The vfio-user client already supports the sparse mmap capability but this was missing from the server implementation. Adding this feature so that a vfio-user server relying on this crate can use the sparse mmap capability to define subregions which must be memory mapped within standard PCI regions. As stated in the vfio-user spec here https://www.qemu.org/docs/master/interop/vfio-user.html#sparse-regions in the context of an NVMe emulated device, having the doorbell region memory mapped allows for great performance since the backend can poll the doorbells directly and catch any new entry in the submission queues. Signed-off-by: Sebastien Boeuf <sboeuf@meta.com>
6cc15bf to
845006b
Compare
rbradford
approved these changes
Mar 2, 2026
likebreath
approved these changes
Mar 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The vfio-user client already supports the sparse mmap capability but
this was missing from the server implementation.
Adding this feature so that a vfio-user server relying on this crate can
use the sparse mmap capability to define subregions which must be memory
mapped within standard PCI regions.
As stated in the vfio-user spec here
https://www.qemu.org/docs/master/interop/vfio-user.html#sparse-regions
in the context of an NVMe emulated device, having the doorbell region
memory mapped allows for great performance since the backend can poll
the doorbells directly and catch any new entry in the submission queues.