]> xenbits.xen.org Git - xenclient/ioemu.git/commitdiff
add two missing cirrus_update_memory_access
authorIan Jackson <ian.jackson@eu.citrix.com>
Tue, 4 Aug 2009 14:23:43 +0000 (15:23 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 4 Aug 2009 14:23:54 +0000 (15:23 +0100)
the cirrus emulation code misses two calls to
cirrus_update_memory_access; this fact together with the condition on the
call to cirrus_update_memory_access in cirrus_bitblt_reset can cause
segfaults in qemu.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
(cherry picked from commit 5a369fdfe6eeb8aa2a2cd52387bf03fed83e925c)

hw/cirrus_vga.c

index 8da0c60cbbd07aaa593252fa30398df622734275..38c829af44a85272e7dcc10554d0d195a2ef01a8 100644 (file)
@@ -1275,6 +1275,7 @@ cirrus_hook_read_sr(CirrusVGAState * s, unsigned reg_index, int *reg_value)
        break;
     case 0x05:                 // ???
     case 0x07:                 // Extended Sequencer Mode
+        cirrus_update_memory_access(s);
     case 0x08:                 // EEPROM Control
     case 0x09:                 // Scratch Register 0
     case 0x0a:                 // Scratch Register 1
@@ -1540,6 +1541,7 @@ cirrus_hook_write_gr(CirrusVGAState * s, unsigned reg_index, int reg_value)
        s->gr[reg_index] = reg_value;
        cirrus_update_bank_ptr(s, 0);
        cirrus_update_bank_ptr(s, 1);
+        cirrus_update_memory_access(s);
         break;
     case 0x0B:
        s->gr[reg_index] = reg_value;