aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Apfelbaum <marcel.a@redhat.com>2013-09-16 11:21:15 +0300
committerMichael S. Tsirkin <mst@redhat.com>2013-10-14 17:11:44 +0300
commit8002ccd6e4c5c52210c5fc886f7bf88fd707c2df (patch)
tree34b5ba0338baa7fe0e2cad0c1baa65e0a1a25097
parenta1ff8ae0666ffcbe78ae7e28812dd30db6bb7131 (diff)
docs/memory: Explictly state that MemoryRegion priority is signed
When memory regions overlap, priority can be used to specify which of them takes priority. By making the priority values signed rather than unsigned, we make it more convenient to implement a situation where one "background" region should appear only where no other region exists: rather than having to explicitly specify a high priority for all the other regions, we can let them take the default (zero) priority and specify a negative priority for the background region. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-rw-r--r--docs/memory.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/memory.txt b/docs/memory.txt
index feb9fe90d7..174c0d7b43 100644
--- a/docs/memory.txt
+++ b/docs/memory.txt
@@ -80,6 +80,10 @@ guest. This is done with memory_region_add_subregion_overlap(), which
allows the region to overlap any other region in the same container, and
specifies a priority that allows the core to decide which of two regions at
the same address are visible (highest wins).
+Priority values are signed, and the default value is zero. This means that
+you can use memory_region_add_subregion_overlap() both to specify a region
+that must sit 'above' any others (with a positive priority) and also a
+background region that sits 'below' others (with a negative priority).
Visibility
----------