aboutsummaryrefslogtreecommitdiff
path: root/exec.c
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2012-01-02 13:20:11 +0200
committerAvi Kivity <avi@redhat.com>2012-01-04 13:34:50 +0200
commitb3b00c78d8247cdffc25839d4b8ff0310a889480 (patch)
treea5352a302a1753adbefb96a804be2a93e466addb /exec.c
parenta621f38de85598a13d8d8524d1a94fc6a1818215 (diff)
downloadqemu-b3b00c78d8247cdffc25839d4b8ff0310a889480.zip
qemu-b3b00c78d8247cdffc25839d4b8ff0310a889480.tar.gz
qemu-b3b00c78d8247cdffc25839d4b8ff0310a889480.tar.bz2
Remove IO_MEM_SUBPAGE
Replace with a MemoryRegion flag. Signed-off-by: Avi Kivity <avi@redhat.com> Reviewed-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'exec.c')
-rw-r--r--exec.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/exec.c b/exec.c
index a61a89f..d5b82aa 100644
--- a/exec.c
+++ b/exec.c
@@ -2552,18 +2552,17 @@ void cpu_register_physical_memory_log(MemoryRegionSection *section,
ram_addr_t orig_memory = p->phys_offset;
target_phys_addr_t start_addr2, end_addr2;
int need_subpage = 0;
+ MemoryRegion *mr = io_mem_region[(orig_memory & ~TARGET_PAGE_MASK)
+ >> IO_MEM_SHIFT];
CHECK_SUBPAGE(addr, start_addr, start_addr2, end_addr, end_addr2,
need_subpage);
if (need_subpage) {
- if (!(orig_memory & IO_MEM_SUBPAGE)) {
+ if (!(mr->subpage)) {
subpage = subpage_init((addr & TARGET_PAGE_MASK),
&p->phys_offset, orig_memory,
p->region_offset);
} else {
- MemoryRegion *mr
- = io_mem_region[(orig_memory & ~TARGET_PAGE_MASK)
- >> IO_MEM_SHIFT];
subpage = container_of(mr, subpage_t, iomem);
}
subpage_register(subpage, start_addr2, end_addr2, phys_offset,
@@ -3396,12 +3395,13 @@ static subpage_t *subpage_init (target_phys_addr_t base, ram_addr_t *phys,
mmio->base = base;
memory_region_init_io(&mmio->iomem, &subpage_ops, mmio,
"subpage", TARGET_PAGE_SIZE);
+ mmio->iomem.subpage = true;
subpage_memory = mmio->iomem.ram_addr;
#if defined(DEBUG_SUBPAGE)
printf("%s: %p base " TARGET_FMT_plx " len %08x %d\n", __func__,
mmio, base, TARGET_PAGE_SIZE, subpage_memory);
#endif
- *phys = subpage_memory | IO_MEM_SUBPAGE;
+ *phys = subpage_memory;
subpage_register(mmio, 0, TARGET_PAGE_SIZE-1, orig_memory, region_offset);
return mmio;