vfio-ioctls: Add VFIO DMA logging methods#150
Merged
Conversation
likebreath
reviewed
May 19, 2026
Collaborator
likebreath
left a comment
There was a problem hiding this comment.
Thanks for the patience. Some comments below.
3dd4ffe to
db0f8c1
Compare
saravan2
commented
May 19, 2026
likebreath
reviewed
May 19, 2026
Collaborator
likebreath
left a comment
There was a problem hiding this comment.
Only two more comments below. Thanks for the fast response.
db0f8c1 to
e5c986b
Compare
saravan2
commented
May 19, 2026
likebreath
approved these changes
May 19, 2026
Collaborator
|
@rbradford @sboeuf PTAL. |
Add VfioDevice methods that drive the VFIO DMA dirty page logging
ioctls used by live migration to track guest pages dirtied by
device DMA.
VfioDevice methods:
- start_dma_logging
- stop_dma_logging
- report_dma_logging
Public types:
- DmaLoggingRange { iova, length }
The kernel reads ranges and writes the dirty bitmap through user
pointers embedded in the feature payload. The Vec backing each
pointer is owned by the calling stack frame and outlives the
ioctl.
VfioDevice tracks whether a logging session is active and enforces
the kernel's one session per device limit. start_dma_logging on an
active session returns DmaLoggingAlreadyStarted. stop_dma_logging
and report_dma_logging on an inactive session return
DmaLoggingNotStarted.
Signed-off-by: Saravanan D <saravanand@crusoe.ai>
dma-logging tests raised coverage percentage. Signed-off-by: Saravanan D <saravanand@crusoe.ai>
e5c986b to
424cea6
Compare
rbradford
approved these changes
May 20, 2026
Contributor
|
Thanks! |
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.
Summary of the PR
Add VfioDevice methods that drive the VFIO DMA dirty page logging ioctls used by live migration to track guest pages dirtied by device DMA.
VfioDevice methods:
Public types:
The kernel reads ranges and writes the dirty bitmap through user pointers embedded in the feature payload. The Vec backing each pointer is owned by the calling stack frame and outlives the ioctl.
Requirements
Before submitting your PR, please make sure you addressed the following
requirements:
git commit -s), and the commit message has max 60 characters for thesummary and max 75 characters for each description line.
test.
Release" section of CHANGELOG.md (if no such section exists, please create one).
unsafecode is properly documented.