Skip to content

vfio-user: Fix sparse mmap#134

Merged
likebreath merged 2 commits intorust-vmm:mainfrom
sboeuf:fix_sparse_mmap
Mar 12, 2026
Merged

vfio-user: Fix sparse mmap#134
likebreath merged 2 commits intorust-vmm:mainfrom
sboeuf:fix_sparse_mmap

Conversation

@sboeuf
Copy link
Collaborator

@sboeuf sboeuf commented Mar 11, 2026

The recently added code for supporting sparse mmap areas in the Server had assumed that a file descriptor was attached to each area. This is not correct, as the specification expects a single file descriptor backing the entire region (one fd per region). And the list of sparse mmap areas corresponds to a list of offset/size that can be mapped within this backing file.

The recently added code for supporting sparse mmap areas in the Server
had assumed that a file descriptor was attached to each area. This is
not correct, as the specification expects a single file descriptor
backing the entire region (one fd per region). And the list of sparse
mmap areas corresponds to a list of offset/size that can be mapped
within this backing file.

Signed-off-by: Sebastien Boeuf <sboeuf@meta.com>
Adding the Clone implementation to IrqInfo, ServerRegion and SparseArea
will allow the consumer of the Server to build these in advance if
needed.

Signed-off-by: Sebastien Boeuf <sboeuf@meta.com>
@sboeuf
Copy link
Collaborator Author

sboeuf commented Mar 12, 2026

@likebreath could you please give this a quick review?

@likebreath likebreath merged commit df861a8 into rust-vmm:main Mar 12, 2026
7 checks passed
@sboeuf
Copy link
Collaborator Author

sboeuf commented Mar 12, 2026

thank you @likebreath :)

@likebreath
Copy link
Collaborator

thank you @likebreath :)

@sboeuf You bet. I think once all the fixes you need are landed for vfio-user, we should prepare a release for the vfio-{user,ioctl,bindings} crates, so that we can consume them from Cloud Hypervisor side. (I believe the heavy-lifting will be bumping all rust-vmm crates.)

What do you think?

@sboeuf
Copy link
Collaborator Author

sboeuf commented Mar 12, 2026

thank you @likebreath :)

@sboeuf You bet. I think once all the fixes you need are landed for vfio-user, we should prepare a release for the vfio-{user,ioctl,bindings} crates, so that we can consume them from Cloud Hypervisor side. (I believe the heavy-lifting will be bumping all rust-vmm crates.)

What do you think?

Yes I agree! A release will be nice, but let's wait a few weeks just in case something else is needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants