From patchwork Sun Sep 15 16:16:40 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcel Apfelbaum X-Patchwork-Id: 275032 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 7DB762C00E7 for ; Mon, 16 Sep 2013 02:17:20 +1000 (EST) Received: from localhost ([::1]:57248 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VLF0g-0001Mc-EI for incoming@patchwork.ozlabs.org; Sun, 15 Sep 2013 12:17:18 -0400 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 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r8FGGbqm024873 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 15 Sep 2013 12:16:37 -0400 Received: from localhost.tlv.redhat.com (dhcp-4-195.tlv.redhat.com [10.35.4.195]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r8FGGTuW024389; Sun, 15 Sep 2013 12:16:34 -0400 From: Marcel Apfelbaum To: qemu-devel@nongnu.org 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> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: peter.maydell@linaro.org, aliguori@us.ibm.com, mst@redhat.com, jan.kiszka@siemens.com, pbonzini@redhat.com, afaerber@suse.de Subject: [Qemu-devel] [PATCH v4 2/3] docs/memory: Explicitly state that MemoryRegion priority is signed X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 Reviewed-by: Peter Maydell --- 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 ----------