[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 11/28] exec: extend skip field to 6 bit, page entry t
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 11/28] exec: extend skip field to 6 bit, page entry to 32 bit |
Date: |
Wed, 11 Dec 2013 20:30:39 +0200 |
Extend skip to 6 bit. As page entry doesn't fit in 16 bit
any longer anyway, extend it to 32 bit.
This doubles node map memory requirements, but follow-up
patches will save this memory.
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
exec.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/exec.c b/exec.c
index e3e5bc0..154ae97 100644
--- a/exec.c
+++ b/exec.c
@@ -84,11 +84,13 @@ 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;
+ uint32_t skip : 6;
/* index into phys_sections (!skip) or phys_map_nodes (skip) */
- uint16_t ptr : 15;
+ uint32_t ptr : 26;
};
+#define PHYS_MAP_NODE_NIL (((uint32_t)~0) >> 6)
+
/* Size of the L2 (and L3, etc) page tables. */
#define ADDR_SPACE_BITS TARGET_PHYS_ADDR_SPACE_BITS
@@ -134,8 +136,6 @@ typedef struct PhysPageMap {
static PhysPageMap *prev_map;
static PhysPageMap next_map;
-#define PHYS_MAP_NODE_NIL (((uint16_t)~0) >> 1)
-
static void io_mem_init(void);
static void memory_map_init(void);
@@ -156,10 +156,10 @@ static void phys_map_node_reserve(unsigned nodes)
}
}
-static uint16_t phys_map_node_alloc(void)
+static uint32_t phys_map_node_alloc(void)
{
unsigned i;
- uint16_t ret;
+ uint32_t ret;
ret = next_map.nodes_nb++;
assert(ret != PHYS_MAP_NODE_NIL);
--
MST
- [Qemu-devel] [PULL 01/28] hw: Pass QEMUMachine to its init() method, (continued)
- [Qemu-devel] [PULL 01/28] hw: Pass QEMUMachine to its init() method, Michael S. Tsirkin, 2013/12/11
- [Qemu-devel] [PULL 03/28] qtest: split configuration of qtest accelerator and chardev, Michael S. Tsirkin, 2013/12/11
- [Qemu-devel] [PULL 02/28] pc: map PCI address space as catchall region for not mapped addresses, Michael S. Tsirkin, 2013/12/11
- [Qemu-devel] [PULL 04/28] acpi-test: basic acpi unit-test, Michael S. Tsirkin, 2013/12/11
- [Qemu-devel] [PULL 05/28] MAINTAINERS: update X86 machine entry, Michael S. Tsirkin, 2013/12/11
- [Qemu-devel] [PULL 06/28] pci: fix address space size for bridge, Michael S. Tsirkin, 2013/12/11
- [Qemu-devel] [PULL 08/28] spapr_pci: s/INT64_MAX/UINT64_MAX/, Michael S. Tsirkin, 2013/12/11
- [Qemu-devel] [PULL 07/28] pc: s/INT64_MAX/UINT64_MAX/, Michael S. Tsirkin, 2013/12/11
- [Qemu-devel] [PULL 09/28] split definitions for exec.c and translate-all.c radix trees, Michael S. Tsirkin, 2013/12/11
- [Qemu-devel] [PULL 10/28] exec: replace leaf with skip, Michael S. Tsirkin, 2013/12/11
- [Qemu-devel] [PULL 11/28] exec: extend skip field to 6 bit, page entry to 32 bit,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL 12/28] exec: pass hw address to phys_page_find, Michael S. Tsirkin, 2013/12/11
- [Qemu-devel] [PULL 13/28] exec: memory radix tree page level compression, Michael S. Tsirkin, 2013/12/11
- [Qemu-devel] [PULL 14/28] exec: make address spaces 64-bit wide, Michael S. Tsirkin, 2013/12/11
- [Qemu-devel] [PULL 15/28] exec: reduce L2_PAGE_SIZE, Michael S. Tsirkin, 2013/12/11
- [Qemu-devel] [PULL 16/28] smbios: Set system manufacturer, product & version by default, Michael S. Tsirkin, 2013/12/11
- [Qemu-devel] [PULL 21/28] hpet: inverse polarity when pin above ISA_NUM_IRQS, Michael S. Tsirkin, 2013/12/11
- [Qemu-devel] [PULL 23/28] memory.c: bugfix - ref counting mismatch in memory_region_find, Michael S. Tsirkin, 2013/12/11
- [Qemu-devel] [PULL 24/28] exec: separate sections and nodes per address space, Michael S. Tsirkin, 2013/12/11
- [Qemu-devel] [PULL 22/28] hpet: enable to entitle more irq pins for hpet, Michael S. Tsirkin, 2013/12/11
- [Qemu-devel] [PULL 25/28] acpi unit-test: load and check facs table, Michael S. Tsirkin, 2013/12/11