Skip to content

Commit

Permalink
docs: document DMA message dirty handling
Browse files Browse the repository at this point in the history
Document that on vfu_sgl_write(), it's the client's responsibility to
track any dirty pages.

Signed-off-by: John Levon <john.levon@nutanix.com>
  • Loading branch information
jlevon committed Jul 28, 2023
1 parent b9ee22b commit 8169627
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions docs/memory-mapping.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,11 @@ case, then the server may only read or write the region the slower way:

```
...
vfu_addr_to_sgl(ctx, iova, len, sg, 1, PROT_READ);
vfu_addr_to_sgl(ctx, iova, len, sg, 1, PROT_WRITE);
vfu_sgl_read(ctx, sg, 1, &buf);
vfu_sgl_write(ctx, sg, 1, &buf);
```

Note that in this case, the server is not expected to report any dirty writes
via `vfu_sgl_mark_dirty()`: as the client is actually writing to memory, it's
the client's responsibility to track any dirtying.

0 comments on commit 8169627

Please sign in to comment.