13 bits left for pointer, which seems enough. Signed-off-by: Michael S. Tsirkin <m...@redhat.com> --- 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