summary refs log tree commit diff stats
path: root/docs/devel
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2022-01-10 17:51:04 +0000
committerPhilippe Mathieu-Daudé <f4bug@amsat.org>2022-01-18 12:56:29 +0100
commit9d696cd50442327fd71ec7309e7b0c6fee693b1d (patch)
treed9e80da7eb15170d386d6555f24f6b422b0bd732 /docs/devel
parentf02b664aad8f1aaafbcdf45285f6fcab0a4bd5d0 (diff)
downloadfocaccia-qemu-9d696cd50442327fd71ec7309e7b0c6fee693b1d.tar.gz
focaccia-qemu-9d696cd50442327fd71ec7309e7b0c6fee693b1d.zip
docs/devel: add some clarifying text for aliases
We do mention the limitation of single parenthood for
memory_region_add_subregion but lets also make it clear how aliases
help solve that conundrum.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220110175104.2908956-7-alex.bennee@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Diffstat (limited to 'docs/devel')
-rw-r--r--docs/devel/memory.rst14
1 files changed, 9 insertions, 5 deletions
diff --git a/docs/devel/memory.rst b/docs/devel/memory.rst
index 5dc8a12682..69c5e3f914 100644
--- a/docs/devel/memory.rst
+++ b/docs/devel/memory.rst
@@ -67,11 +67,15 @@ MemoryRegion):
 
   You initialize a pure container with memory_region_init().
 
-- alias: a subsection of another region.  Aliases allow a region to be
-  split apart into discontiguous regions.  Examples of uses are memory banks
-  used when the guest address space is smaller than the amount of RAM
-  addressed, or a memory controller that splits main memory to expose a "PCI
-  hole".  Aliases may point to any type of region, including other aliases,
+- alias: a subsection of another region. Aliases allow a region to be
+  split apart into discontiguous regions. Examples of uses are memory
+  banks used when the guest address space is smaller than the amount
+  of RAM addressed, or a memory controller that splits main memory to
+  expose a "PCI hole". You can also create aliases to avoid trying to
+  add the original region to multiple parents via
+  `memory_region_add_subregion`.
+
+  Aliases may point to any type of region, including other aliases,
   but an alias may not point back to itself, directly or indirectly.
   You initialize these with memory_region_init_alias().