]> git.ipfire.org Git - thirdparty/qemu.git/commit - exec.c
memory: store MemoryRegionSection pointers in phys_map
authorAvi Kivity <avi@redhat.com>
Sun, 12 Feb 2012 16:32:55 +0000 (18:32 +0200)
committerAvi Kivity <avi@redhat.com>
Wed, 29 Feb 2012 11:44:43 +0000 (13:44 +0200)
commit5312bd8b3152f8d4fcf9389ba54e32b09f4b4093
tree5567d7386b6786b822e66b7a487c55f056124639
parent4346ae3e28fc19e01b3070de169ea9fcef5f54aa
memory: store MemoryRegionSection pointers in phys_map

Instead of storing PhysPageDesc, store pointers to MemoryRegionSections.
The various offsets (phys_offset & ~TARGET_PAGE_MASK,
PHYS_OFFSET & TARGET_PAGE_MASK, region_offset) can all be synthesized
from the information in a MemoryRegionSection.  Adjust phys_page_find()
to synthesize a PhysPageDesc.

The upshot is that phys_map now contains uniform values, so it's easier
to generate and compress.

The end result is somewhat clumsy but this will be improved as we we
propagate MemoryRegionSections throughout the code instead of transforming
them to PhysPageDesc.

The MemoryRegionSection pointers are stored as uint16_t offsets in an
array.  This saves space (when we also compress node pointers) and is
more cache friendly.

Signed-off-by: Avi Kivity <avi@redhat.com>
exec.c