[7141] vga: Cleanup dirty logging (Jan Kiszka)
Revision: 7141
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=7141 Author: aliguori Date: 2009-04-17 14:26:41 +0000 (Fri, 17 Apr 2009)
Log Message:
-----------
vga: Cleanup dirty logging (Jan Kiszka)
In theory, there are no more quirks in the KVM slot management that requires dirty log start/stop all over the place. We just have to start the logging each time the mapping may have changed. This patch drops vga_dirty_log_stop for both standard and cirrus VGA. It also reverts #6851 as it was obviously a tribute to the old slot system.
Modified Paths:
--------------
trunk/hw/cirrus_vga.c
trunk/hw/vga.c
trunk/hw/vga_int.h
Modified: trunk/hw/cirrus_vga.c
===================================================================
hw/cirrus_vga.c +0 -17
@@ -2618,8 +2618,6 @@static void map_linear_vram (CirrusVGAState *s) { -vga_dirty_log_stop ((VGAState *)s); -if (!s->map_addr && s->lfb_addr && s->lfb_end) { s->map_addr = s->lfb_addr; s->map_end = s->lfb_end;
@@ -2631,16 +2629,11 @@ s->lfb_vram_mapped =0 ; -cpu_register_physical_memory (isa_mem_base +0xa0000 ,0x8000 , - (s->vram_offset + s->cirrus_bank_base[0 ]) |IO_MEM_UNASSIGNED ); -cpu_register_physical_memory (isa_mem_base +0xa8000 ,0x8000 , - (s->vram_offset + s->cirrus_bank_base[1 ]) |IO_MEM_UNASSIGNED );if (!(s->cirrus_srcptr != s->cirrus_srcptr_end) && !((s->sr[0x07 ] &0x01 ) ==0 ) && !((s->gr[0x0B ] &0x14 ) ==0x14 ) && !(s->gr[0x0B ] &0x02 )) { -vga_dirty_log_stop ((VGAState *)s);cpu_register_physical_memory (isa_mem_base +0xa0000 ,0x8000 , (s->vram_offset + s->cirrus_bank_base[0 ]) |IO_MEM_RAM ); cpu_register_physical_memory(isa_mem_base + 0xa8000, 0x8000,
@@ -2658,15 +2651,11 @@static void unmap_linear_vram (CirrusVGAState *s) { -vga_dirty_log_stop ((VGAState *)s); -if (s->map_addr && s->lfb_addr && s->lfb_end) s->map_addr = s->map_end =0 ;cpu_register_physical_memory (isa_mem_base +0xa0000 ,0x20000 , s->vga_io_memory); - -vga_dirty_log_start ((VGAState *)s); }/* Compute the memory access functions */
@@ -3313,8 +3302,6 @@ {CirrusVGAState *s = &((PCICirrusVGAState *)d)->cirrus_vga; -vga_dirty_log_stop ((VGAState *)s); -/* XXX: add byte swapping apertures */ cpu_register_physical_memory (addr, s->vram_size, s->cirrus_linear_io_addr);
@@ -3346,14 +3333,10 @@PCICirrusVGAState *pvs =container_of (d, PCICirrusVGAState, dev);CirrusVGAState *s = &pvs->cirrus_vga; -vga_dirty_log_stop ((VGAState *)s); -pci_default_write_config (d, address, val, len);if (s->map_addr && pvs->dev.io_regions[0 ].addr ==-1 ) s->map_addr =0 ;cirrus_update_memory_access (s); - -vga_dirty_log_start ((VGAState *)s); }void pci_cirrus_vga_init (PCIBus *bus,int vga_ram_size)
Modified: trunk/hw/vga.c
===================================================================
hw/vga.c +0 -17
@@ -1279,8 +1279,6 @@vga_draw_glyph8_func *vga_draw_glyph8;vga_draw_glyph9_func *vga_draw_glyph9; -vga_dirty_log_stop (s); -/* compute font data address (in plane 2) */ v = s->sr[3 ]; offset = (((v >>4 ) &1 ) | ((v <<1 ) &6 )) *8192 *4 +2 ;
@@ -1579,7 +1577,6 @@cpu_physical_sync_dirty_bitmap (isa_mem_base +0xa0000 ,0xa8000 );cpu_physical_sync_dirty_bitmap (isa_mem_base +0xa8000 ,0xb0000 ); } -vga_dirty_log_start (s); }/*
@@ -1810,7 +1807,6 @@return ;if (s->last_scr_width <=0 || s->last_scr_height <=0 )return ; -vga_dirty_log_stop (s); s->rgb_to_pixel = rgb_to_pixel_dup_table[get_depth_index (s->ds)];
@@ -2238,17 +2234,6 @@ } } -void vga_dirty_log_stop (VGAState *s) -{ -if (kvm_enabled () && s->map_addr) -kvm_log_stop (s->map_addr, s->map_end - s->map_addr); - -if (kvm_enabled () && s->lfb_vram_mapped) { -kvm_log_stop (isa_mem_base +0xa0000 ,0x8000 ); -kvm_log_stop (isa_mem_base +0xa8000 ,0x8000 ); - } -} -static void vga_map (PCIDevice *pci_dev,int region_num,uint32_t addr,uint32_t size,int type) {
@@ -2489,11 +2474,9 @@PCIVGAState *pvs =container_of (d, PCIVGAState, dev);VGAState *s = &pvs->vga_state; -vga_dirty_log_stop (s);pci_default_write_config (d, address, val, len);if (s->map_addr && pvs->dev.io_regions[0 ].addr ==-1 ) s->map_addr =0 ; -vga_dirty_log_start (s); } int pci_vga_init(PCIBus *bus, int vga_ram_size,
Modified: trunk/hw/vga_int.h
===================================================================
hw/vga_int.h +0 -1
@@ -196,7 +196,6 @@void vga_reset (void *s);void vga_dirty_log_start (VGAState *s); -void vga_dirty_log_stop (VGAState *s);uint32_t vga_mem_readb (void *opaque,target_phys_addr_t addr);void vga_mem_writeb (void *opaque,target_phys_addr_t addr,uint32_t val);