aboutsummaryrefslogtreecommitdiff
path: root/hw/cirrus_vga.c
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2011-08-01 11:03:42 +0300
committerAvi Kivity <avi@redhat.com>2011-09-04 17:46:51 +0300
commit64c048f4a86d92078970ca5d817fd6411430b6a0 (patch)
treea7427f66c8c7d640b7485ae3befa5e31959abc4f /hw/cirrus_vga.c
parenta4911d642532f8ca1c1353e47de0ec0d5b19ef86 (diff)
downloadqemu-64c048f4a86d92078970ca5d817fd6411430b6a0.zip
qemu-64c048f4a86d92078970ca5d817fd6411430b6a0.tar.gz
qemu-64c048f4a86d92078970ca5d817fd6411430b6a0.tar.bz2
cirrus: wrap memory update in a transaction
This prevents spurious unmapping and remapping of the vga windows, which reduces performance. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'hw/cirrus_vga.c')
-rw-r--r--hw/cirrus_vga.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c
index 4d0ef0d..ec7ea82 100644
--- a/hw/cirrus_vga.c
+++ b/hw/cirrus_vga.c
@@ -2424,6 +2424,7 @@ static void cirrus_update_memory_access(CirrusVGAState *s)
{
unsigned mode;
+ memory_region_transaction_begin();
if ((s->vga.sr[0x17] & 0x44) == 0x44) {
goto generic_io;
} else if (s->cirrus_srcptr != s->cirrus_srcptr_end) {
@@ -2443,6 +2444,7 @@ static void cirrus_update_memory_access(CirrusVGAState *s)
unmap_linear_vram(s);
}
}
+ memory_region_transaction_commit();
}