aboutsummaryrefslogtreecommitdiff
path: root/exec.c
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2013-06-24 10:45:09 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2013-07-04 17:42:44 +0200
commitb40acf99bef69fa8ab0f9092ff162fde945eec12 (patch)
tree3be0e88794cb67e6e20aa78580572f3babd1d54c /exec.c
parent962b03fcf509db25c847aa67c4eff574c240dcfe (diff)
downloadqemu-b40acf99bef69fa8ab0f9092ff162fde945eec12.zip
qemu-b40acf99bef69fa8ab0f9092ff162fde945eec12.tar.gz
qemu-b40acf99bef69fa8ab0f9092ff162fde945eec12.tar.bz2
ioport: Switch dispatching to memory core layer
The current ioport dispatcher is a complex beast, mostly due to the need to deal with old portio interface users. But we can overcome it without converting all portio users by embedding the required base address of a MemoryRegionPortio access into that data structure. That removes the need to have the additional MemoryRegionIORange structure in the loop on every access. To handle old portio memory ops, we simply install dispatching handlers for portio memory regions when registering them with the memory core. This removes the need for the old_portio field. We can drop the additional aliasing of ioport regions and also the special address space listener. cpu_in and cpu_out now simply call address_space_read/write. And we can concentrate portio handling in a single source file. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'exec.c')
-rw-r--r--exec.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/exec.c b/exec.c
index c49806c..5a55d2a 100644
--- a/exec.c
+++ b/exec.c
@@ -1752,26 +1752,6 @@ static void core_log_global_stop(MemoryListener *listener)
cpu_physical_memory_set_dirty_tracking(0);
}
-static void io_region_add(MemoryListener *listener,
- MemoryRegionSection *section)
-{
- 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,
- int128_get64(section->size));
- ioport_register(&mrio->iorange);
-}
-
-static void io_region_del(MemoryListener *listener,
- MemoryRegionSection *section)
-{
- isa_unassign_ioport(section->offset_within_address_space,
- int128_get64(section->size));
-}
-
static MemoryListener core_memory_listener = {
.begin = core_begin,
.log_global_start = core_log_global_start,
@@ -1779,12 +1759,6 @@ static MemoryListener core_memory_listener = {
.priority = 1,
};
-static MemoryListener io_memory_listener = {
- .region_add = io_region_add,
- .region_del = io_region_del,
- .priority = 0,
-};
-
static MemoryListener tcg_memory_listener = {
.commit = tcg_commit,
};
@@ -1826,7 +1800,6 @@ static void memory_map_init(void)
address_space_init(&address_space_io, system_io, "I/O");
memory_listener_register(&core_memory_listener, &address_space_memory);
- memory_listener_register(&io_memory_listener, &address_space_io);
memory_listener_register(&tcg_memory_listener, &address_space_memory);
}