diff options
author | Avi Kivity <avi@redhat.com> | 2011-08-15 17:17:29 +0300 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2011-08-22 10:47:47 -0500 |
commit | d76120135b9ed5ea34c2038629dc9bc563f46108 (patch) | |
tree | f9b6c7ca5d516c8e3018e20966726b0f2252abbb /hw/sysbus.h | |
parent | b6dcbe086c77ec683f5ff0b693593cda1d61f3a1 (diff) | |
download | qemu-d76120135b9ed5ea34c2038629dc9bc563f46108.zip qemu-d76120135b9ed5ea34c2038629dc9bc563f46108.tar.gz qemu-d76120135b9ed5ea34c2038629dc9bc563f46108.tar.bz2 |
sysbus: add a variant of sysbus_init_mmio_cb with an unmap callback
sysbus_init_mmio_cb() uses the destructive IO_MEM_UNASSIGNED to remove a
region. Provide an alternative that calls an unmap callback, so the removal
may be done non-destructively.
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/sysbus.h')
-rw-r--r-- | hw/sysbus.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/sysbus.h b/hw/sysbus.h index 5f62e2d..16fd969 100644 --- a/hw/sysbus.h +++ b/hw/sysbus.h @@ -23,6 +23,7 @@ struct SysBusDevice { target_phys_addr_t addr; target_phys_addr_t size; mmio_mapfunc cb; + mmio_mapfunc unmap; ram_addr_t iofunc; MemoryRegion *memory; } mmio[QDEV_MAX_MMIO]; @@ -48,6 +49,8 @@ void sysbus_init_mmio(SysBusDevice *dev, target_phys_addr_t size, ram_addr_t iofunc); void sysbus_init_mmio_cb(SysBusDevice *dev, target_phys_addr_t size, mmio_mapfunc cb); +void sysbus_init_mmio_cb2(SysBusDevice *dev, + mmio_mapfunc cb, mmio_mapfunc unmap); void sysbus_init_mmio_region(SysBusDevice *dev, MemoryRegion *memory); void sysbus_init_irq(SysBusDevice *dev, qemu_irq *p); void sysbus_pass_irq(SysBusDevice *dev, SysBusDevice *target); |