aboutsummaryrefslogtreecommitdiff
path: root/ioport.c
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2013-07-02 20:22:37 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2013-10-17 17:24:15 +0200
commitc76bc480e2d70762d02373678942c98fb193b9e5 (patch)
tree248be3c187fd0288e5d64f8bf4b1fc4fab588a6e /ioport.c
parent518420dfec2f082cfecbc6eec79fcc91388cf751 (diff)
downloadqemu-c76bc480e2d70762d02373678942c98fb193b9e5.zip
qemu-c76bc480e2d70762d02373678942c98fb193b9e5.tar.gz
qemu-c76bc480e2d70762d02373678942c98fb193b9e5.tar.bz2
portio: Allow to mark portio lists as coalesced MMIO flushing
This will enable us to remove all remaining explicit calls of qemu_flush_coalesced_mmio_buffer in IO handlers. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'ioport.c')
-rw-r--r--ioport.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/ioport.c b/ioport.c
index 707cce8..3d91e79 100644
--- a/ioport.c
+++ b/ioport.c
@@ -139,6 +139,12 @@ void portio_list_init(PortioList *piolist,
piolist->opaque = opaque;
piolist->owner = owner;
piolist->name = name;
+ piolist->flush_coalesced_mmio = false;
+}
+
+void portio_list_set_flush_coalesced(PortioList *piolist)
+{
+ piolist->flush_coalesced_mmio = true;
}
void portio_list_destroy(PortioList *piolist)
@@ -231,6 +237,9 @@ static void portio_list_add_1(PortioList *piolist,
*/
memory_region_init_io(&mrpio->mr, piolist->owner, &portio_ops, mrpio,
piolist->name, off_high - off_low);
+ if (piolist->flush_coalesced_mmio) {
+ memory_region_set_flush_coalesced(&mrpio->mr);
+ }
memory_region_add_subregion(piolist->address_space,
start + off_low, &mrpio->mr);
piolist->regions[piolist->nr] = &mrpio->mr;