From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39780) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VLF09-0001Go-0M for qemu-devel@nongnu.org; Sun, 15 Sep 2013 12:16:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VLF03-0001EH-0P for qemu-devel@nongnu.org; Sun, 15 Sep 2013 12:16:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:25165) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VLF02-0001EC-PH for qemu-devel@nongnu.org; Sun, 15 Sep 2013 12:16:38 -0400 From: Marcel Apfelbaum Date: Sun, 15 Sep 2013 19:16:40 +0300 Message-Id: <1379261801-16969-3-git-send-email-marcel.a@redhat.com> In-Reply-To: <1379261801-16969-1-git-send-email-marcel.a@redhat.com> References: <1379261801-16969-1-git-send-email-marcel.a@redhat.com> Subject: [Qemu-devel] [PATCH v4 2/3] docs/memory: Explicitly state that MemoryRegion priority is signed List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, aliguori@us.ibm.com, mst@redhat.com, jan.kiszka@siemens.com, pbonzini@redhat.com, afaerber@suse.de Priority was used to make visible some subregions by obscuring the parent MemoryRegion addresses overlapping with the subregion. By allowing the priority to be negative the opposite can be done: Allow a subregion to be visible on all the addresses not covered by other subregions. Signed-off-by: Marcel Apfelbaum --- docs/memory.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/memory.txt b/docs/memory.txt index feb9fe9..174c0d7 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 ---------- -- 1.8.3.1