qemu/system
Bernhard Beschow 4edee342f8 exec/ioport: Resolve redundant .base attribute in struct MemoryRegionPortio
portio_list_add_1() creates a MemoryRegionPortioList instance which holds a
MemoryRegion `mr` and an array of MemoryRegionPortio elements named `ports`.
Each element in the array gets assigned the same value for its .base attribute.
The same value also ends up as the .addr attribute of `mr` due to the
memory_region_add_subregion() call. This means that all .base attributes are
the same as `mr.addr`.

The only usages of MemoryRegionPortio::base were in portio_read() and
portio_write(). Both functions get above MemoryRegionPortioList as their
opaque parameter. In both cases find_portio() can only return one of the
MemoryRegionPortio elements of the `ports` array. Due to above observation any
element will have the same .base value equal to `mr.addr` which is also
accessible.

Hence, `mrpio->mr.addr` is equivalent to `mrp->base` and
MemoryRegionPortio::base is redundant and can be removed.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Message-Id: <20240114123911.4877-5-shentey@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2024-02-14 06:09:32 -05:00
..
arch_init.c
async-teardown.c
balloon.c balloon: Fix a misleading error message 2023-11-17 10:07:52 +01:00
bootdevice.c
cpu-throttle.c qemu/main-loop: rename qemu_cond_wait_iothread() to qemu_cond_wait_bql() 2024-01-08 10:45:43 -05:00
cpu-timers.c system/cpu-timers: Introduce ICountMode enumerator 2024-01-19 12:28:59 +01:00
cpus.c qemu/main-loop: rename qemu_cond_wait_iothread() to qemu_cond_wait_bql() 2024-01-08 10:45:43 -05:00
datadir.c
device_tree.c
dirtylimit.c system/cpus: rename qemu_mutex_lock_iothread() to bql_lock() 2024-01-08 10:45:43 -05:00
dma-helpers.c scsi: assert that callbacks run in the correct AioContext 2023-12-21 22:49:27 +01:00
globals.c net: make nb_nics and nd_table[] static in net/net.c 2024-02-02 16:23:48 +00:00
ioport.c exec/ioport: Resolve redundant .base attribute in struct MemoryRegionPortio 2024-02-14 06:09:32 -05:00
main.c softmmu: pass the main loop status to gdb "Wxx" packet 2023-10-12 12:33:24 +10:00
memory.c system/cpus: rename qemu_mutex_lock_iothread() to bql_lock() 2024-01-08 10:45:43 -05:00
memory_mapping.c memory: follow Error API guidelines 2023-10-19 23:13:27 +02:00
meson.build configure, meson: rename targetos to host_os 2023-12-31 09:11:29 +01:00
physmem.c target: Make qemu_target_page_mask() available for *-user 2024-01-29 21:04:10 +10:00
qdev-monitor.c Add virtio-sound-pci device 2023-11-07 03:39:10 -05:00
qemu-seccomp.c
qtest.c system/qtest: Include missing 'hw/core/cpu.h' header 2023-12-20 10:29:23 +01:00
rtc.c
runstate-action.c
runstate-hmp-cmds.c
runstate.c qapi: Remove deprecated 'singlestep' member of StatusInfo 2024-01-19 11:38:32 +01:00
tpm-hmp-cmds.c
tpm.c
trace-events
trace.h
vl.c oslib-posix: initialize backend memory objects in parallel 2024-02-06 08:15:22 +01:00
watchpoint.c system/watchpoint: Move TCG specific code to accel/tcg/ 2024-01-19 12:28:59 +01:00