exec: store RAMBlock pointer into memory region
commit58eaa2174e99d9a05172d03fd2799ab8fd9e6f60
authorGonglei <arei.gonglei@huawei.com>
Mon, 22 Feb 2016 08:34:55 +0000 (22 16:34 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 25 Feb 2016 15:11:26 +0000 (25 16:11 +0100)
treeed5148b0d4e23bb0ea74372a85ecc3ba6fb3262a
parent96c33a4523ee1abe382ce4ff3e82b90ba78aa186
exec: store RAMBlock pointer into memory region

Each RAM memory region has a unique corresponding RAMBlock.
In the current realization, the memory region only stored
the ram_addr which means the offset of RAM address space,
We need to qurey the global ram.list to find the ram block
by ram_addr if we want to get the ram block, which is very
expensive.

Now, we store the RAMBlock pointer into memory region
structure. So, if we know the mr, we can easily get the
RAMBlock.

Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Message-Id: <1456130097-4208-2-git-send-email-arei.gonglei@huawei.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
exec.c
include/exec/memory.h
memory.c