Skip to contentSkip to conversation

qapi: clarify that the default is backend dependent

PATCH In review Stefano Garzarella 2 participants 2 messages Jun 11, 2024

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 qapi: clarify that the default is backend dependent

The default value of the @share option of the @MemoryBackendProperties really depends on the backend type, so let's document the default values in the same place where we define the option to avoid dispersing the information.

---
v2:
- documented @share's default right where it's defined [Markus]

v1: https://patchew.org/QEMU/[email protected]/

---
 qapi/qom.json | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
qapi/qom.json +3 -5
index 8bd299265e..9b8f6a7ab5 100644
@@ -600,7 +600,9 @@
 #     preallocation threads (default: none) (since 7.2)
 #
 # @share: if false, the memory is private to QEMU; if true, it is
-#     shared (default: false)
+#     shared (default false for backends memory-backend-file and
+#     memory-backend-ram, true for backends memory-backend-epc and
+#     memory-backend-memfd)
 #
 # @reserve: if true, reserve swap space (or huge pages) if applicable
 #     (default: true) (since 6.1)
@@ -700,8 +702,6 @@
 #
 # Properties for memory-backend-memfd objects.
 #
-# The @share boolean option is true by default with memfd.
-#
 # @hugetlb: if true, the file to be created resides in the hugetlbfs
 #     filesystem (default: false)
 #
@@ -726,8 +726,6 @@
 #
 # Properties for memory-backend-epc objects.
 #
-# The @share boolean option is true by default with epc
-#
 # The @merge boolean option is false by default with epc
 #
 # The @dump boolean option is false by default with epc
Signature · 1 line
2.45.2
Reviewed-by on v2 1/1
#1 lore raw
Quoted 8 lines · Stefano Garzarella

The default value of the @share option of the @MemoryBackendProperties really depends on the backend type, so let's document the default values in the same place where we define the option to avoid dispersing the information.

and queued. Thanks!