Received: from eggs.gnu.org ([2001:4830:134:3::10]:35309) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VfuVA-0007Rl-2Q for qemu-devel@nongnu.org; Mon, 11 Nov 2013 11:38:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VfuV3-0000OV-Pg for qemu-devel@nongnu.org; Mon, 11 Nov 2013 11:38:11 -0500 Received: from mx1.redhat.com ([209.132.183.28]:21595) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VfuV3-0000OR-Ho for qemu-devel@nongnu.org; Mon, 11 Nov 2013 11:38:05 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rABGc3sC000467 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 11 Nov 2013 11:38:04 -0500 Received: from redhat.com (vpn1-4-246.ams2.redhat.com [10.36.4.246]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id rABGc2db030662 for ; Mon, 11 Nov 2013 11:38:03 -0500 Date: Mon, 11 Nov 2013 18:41:03 +0200 From: "Michael S. Tsirkin" Message-ID: <1384187560-20557-5-git-send-email-mst@redhat.com> References: <1384187560-20557-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1384187560-20557-1-git-send-email-mst@redhat.com> Subject: [Qemu-devel] [PATCH RFC 4/5] exec: extend skip field to 3 bits List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 13 bits left for pointer, which seems enough. Signed-off-by: Michael S. Tsirkin --- exec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/exec.c b/exec.c index 7e512db..39f76ee 100644 --- a/exec.c +++ b/exec.c @@ -84,9 +84,9 @@ typedef struct PhysPageEntry PhysPageEntry; struct PhysPageEntry { /* How many bits skip to next level (in units of L2_SIZE). 0 for a leaf. */ - uint16_t skip : 1; + uint16_t skip : 3; /* index into phys_sections (!skip) or phys_map_nodes (skip) */ - uint16_t ptr : 15; + uint16_t ptr : 13; }; /* Size of the L2 (and L3, etc) page tables. */ @@ -134,7 +134,7 @@ typedef struct PhysPageMap { static PhysPageMap *prev_map; static PhysPageMap next_map; -#define PHYS_MAP_NODE_NIL (((uint16_t)~0) >> 1) +#define PHYS_MAP_NODE_NIL (((uint16_t)~0) >> 3) static void io_mem_init(void); static void memory_map_init(void); -- MST