summary refs log tree commit diff stats
path: root/include/exec/ioport.h
diff options
context:
space:
mode:
authorBernhard Beschow <shentey@gmail.com>2024-01-14 13:39:05 +0100
committerMichael S. Tsirkin <mst@redhat.com>2024-02-14 06:09:32 -0500
commitad2b652341f4257e2fb7ebf3834724f91173a07a (patch)
treef7a03900b29c41da3b906db53f421f99feb98f8b /include/exec/ioport.h
parent4edee342f81397e8938ba7a80d1908c5103b66c8 (diff)
downloadfocaccia-qemu-ad2b652341f4257e2fb7ebf3834724f91173a07a.tar.gz
focaccia-qemu-ad2b652341f4257e2fb7ebf3834724f91173a07a.zip
exec/ioport: Add portio_list_set_address()
Some SuperI/O devices such as the VIA south bridges or the PC87312 controller
are able to relocate their SuperI/O functions. Add a convenience function for
implementing this in the VIA south bridges.

This convenience function relies on previous simplifications in exec/ioport
which avoids some duplicate synchronization of I/O port base addresses. The
naming of the function is inspired by its memory_region_set_address() pendant.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Message-Id: <20240114123911.4877-6-shentey@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/exec/ioport.h')
-rw-r--r--include/exec/ioport.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/exec/ioport.h b/include/exec/ioport.h
index 95f1dc30d0..96858e5ac3 100644
--- a/include/exec/ioport.h
+++ b/include/exec/ioport.h
@@ -54,6 +54,7 @@ typedef struct PortioList {
     const struct MemoryRegionPortio *ports;
     Object *owner;
     struct MemoryRegion *address_space;
+    uint32_t addr;
     unsigned nr;
     struct MemoryRegion **regions;
     void *opaque;
@@ -70,5 +71,6 @@ void portio_list_add(PortioList *piolist,
                      struct MemoryRegion *address_space,
                      uint32_t addr);
 void portio_list_del(PortioList *piolist);
+void portio_list_set_address(PortioList *piolist, uint32_t addr);
 
 #endif /* IOPORT_H */