@@ -465,6 +465,7 @@ Examples of such memory API functions are:
- memory_region_set_address()
- memory_region_set_alias_offset()
- portio_list_set_address()
+ - portio_list_set_enabled()
Iterative device migration
--------------------------
@@ -71,6 +71,7 @@ void portio_list_add(PortioList *piolist,
struct MemoryRegion *address_space,
uint32_t addr);
void portio_list_del(PortioList *piolist);
+void portio_list_set_enabled(PortioList *piolist, bool enabled);
void portio_list_set_address(PortioList *piolist, uint32_t addr);
#endif /* IOPORT_H */
@@ -324,6 +324,15 @@ void portio_list_del(PortioList *piolist)
}
}
+void portio_list_set_enabled(PortioList *piolist, bool enabled)
+{
+ unsigned i;
+
+ for (i = 0; i < piolist->nr; ++i) {
+ memory_region_set_enabled(piolist->regions[i], enabled);
+ }
+}
+
void portio_list_set_address(PortioList *piolist, uint32_t addr)
{
MemoryRegionPortioList *mrpio;
Some SuperI/O devices such as the VIA south bridges or the PC87312 controller allow to enable or disable their SuperI/O functions. Add a convenience function for implementing this in the VIA south bridges. The naming of the functions is inspired by its memory_region_set_enabled() pendant. Signed-off-by: Bernhard Beschow <shentey@gmail.com> --- docs/devel/migration.rst | 1 + include/exec/ioport.h | 1 + system/ioport.c | 9 +++++++++ 3 files changed, 11 insertions(+)