summary refs log tree commit diff stats
path: root/include/exec
diff options
context:
space:
mode:
authorMattias Nissler <mnissler@rivosinc.com>2024-09-10 14:35:12 -0700
committerMichael S. Tsirkin <mst@redhat.com>2024-11-04 09:22:58 -0500
commitc3ec57e495b032047ddfef2075792340c407532a (patch)
treebf4160069918ba774792a8991102ac2c8fd85833 /include/exec
parent92ec7805190313c9e628f8fc4eb4f932c15247bd (diff)
downloadfocaccia-qemu-c3ec57e495b032047ddfef2075792340c407532a.tar.gz
focaccia-qemu-c3ec57e495b032047ddfef2075792340c407532a.zip
softmmu: Expand comments describing max_bounce_buffer_size
Clarify how the parameter gets configured and how it is used when
servicing DMA mapping requests targeting indirect memory regions.

Signed-off-by: Mattias Nissler <mnissler@rivosinc.com>
Message-Id: <20240910213512.843130-1-mnissler@rivosinc.com>
Acked-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/exec')
-rw-r--r--include/exec/memory.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/exec/memory.h b/include/exec/memory.h
index e5e865d1a9..9458e2801d 100644
--- a/include/exec/memory.h
+++ b/include/exec/memory.h
@@ -1104,7 +1104,14 @@ struct AddressSpace {
     QTAILQ_HEAD(, MemoryListener) listeners;
     QTAILQ_ENTRY(AddressSpace) address_spaces_link;
 
-    /* Maximum DMA bounce buffer size used for indirect memory map requests */
+    /*
+     * Maximum DMA bounce buffer size used for indirect memory map requests.
+     * This limits the total size of bounce buffer allocations made for
+     * DMA requests to indirect memory regions within this AddressSpace. DMA
+     * requests that exceed the limit (e.g. due to overly large requested size
+     * or concurrent DMA requests having claimed too much buffer space) will be
+     * rejected and left to the caller to handle.
+     */
     size_t max_bounce_buffer_size;
     /* Total size of bounce buffers currently allocated, atomically accessed */
     size_t bounce_buffer_size;