-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: server sample not marking dirty pages #748
Conversation
Could you also add a check in the client that pages do get dirtied by the server? |
Replaced by #753. |
I'll do this separately. |
Reopening this one to replace #753. |
@w-henderson I'm not sure why you requested another review, you haven't addressed my comment here: #748 (comment) |
Sorry I missed that - I'm not sure I completely understand your comment, can you explain again what it is I need to do please? |
Sure I'll rephrase. In the server sample we try to demonstrate two things:
The server should not have to use
|
I'd like to add something to memory-mapping.md for that, to describe our expectations here. Perhaps even a comment in handle_dma_write() saying "here we'd mark these pages as dirty". Therefore, to demonstrate dirty page tracking in libvfio-user (point 2.), the server also needs to write to guest RAM directly by using
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain in the commit how the patch achieves what you state in the commit title?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just tiny nits
19b5942
to
897a6b5
Compare
In `do_dma_io`, the server sample was calling `vfu_sgl_write` without calling `vfu_sgl_mark_dirty`, which resulted in no pages being marked dirty. Signed-off-by: William Henderson <william.henderson@nutanix.com>
Signed-off-by: William Henderson <william.henderson@nutanix.com>
Signed-off-by: William Henderson <william.henderson@nutanix.com>
Signed-off-by: William Henderson <william.henderson@nutanix.com>
Signed-off-by: William Henderson <william.henderson@nutanix.com>
Signed-off-by: William Henderson <william.henderson@nutanix.com>
Signed-off-by: William Henderson <william.henderson@nutanix.com>
Signed-off-by: William Henderson <william.henderson@nutanix.com>
Signed-off-by: William Henderson <william.henderson@nutanix.com>
Signed-off-by: William Henderson <william.henderson@nutanix.com>
Signed-off-by: William Henderson <william.henderson@nutanix.com>
897a6b5
to
a4b9b0e
Compare
The server sample is supposed to demonstrate dirty page logging, but it was not marking dirty pages. This commit both adds client-side dirty page tracking for pages dirtied with
vfu_sgl_write
and server-side dirty page tracking for pages directly dirtied by the server usingvfu_sgl_get/put
.