aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJohn Levon <john.levon@nutanix.com>2023-07-31 14:43:23 +0100
committerGitHub <noreply@github.com>2023-07-31 14:43:23 +0100
commit8038da119c3fd53970d6820208b78e9c1798ba95 (patch)
tree649a8f86e1347473b94593c4f60ff317e89e8e9c /docs
parent56eeb6809e4d68546eae3ff8d0e03aaea66d46d1 (diff)
downloadlibvfio-user-8038da119c3fd53970d6820208b78e9c1798ba95.zip
libvfio-user-8038da119c3fd53970d6820208b78e9c1798ba95.tar.gz
libvfio-user-8038da119c3fd53970d6820208b78e9c1798ba95.tar.bz2
docs: document DMA message dirty handling (#755)
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>
Diffstat (limited to 'docs')
-rw-r--r--docs/memory-mapping.md8
1 files changed, 6 insertions, 2 deletions
diff --git a/docs/memory-mapping.md b/docs/memory-mapping.md
index f5c5bce..edd4468 100644
--- a/docs/memory-mapping.md
+++ b/docs/memory-mapping.md
@@ -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.