diff options
Diffstat (limited to 'exec.c')
-rw-r--r-- | exec.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -3668,9 +3668,13 @@ static void io_commit(MemoryListener *listener) static void io_region_add(MemoryListener *listener, MemoryRegionSection *section) { - iorange_init(§ion->mr->iorange, &memory_region_iorange_ops, + MemoryRegionIORange *mrio = g_new(MemoryRegionIORange, 1); + + mrio->mr = section->mr; + mrio->offset = section->offset_within_region; + iorange_init(&mrio->iorange, &memory_region_iorange_ops, section->offset_within_address_space, section->size); - ioport_register(§ion->mr->iorange); + ioport_register(&mrio->iorange); } static void io_region_del(MemoryListener *listener, |