qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH RFC 4/5] exec: extend skip field to 3 bits


From: Michael S. Tsirkin
Subject: [Qemu-devel] [PATCH RFC 4/5] exec: extend skip field to 3 bits
Date: Mon, 11 Nov 2013 18:41:03 +0200

13 bits left for pointer, which seems enough.

Signed-off-by: Michael S. Tsirkin <address@hidden>
---
 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]