vga: Mark relevant portio lists regions as coalesced MMIO flushing
This allows to remove the explicit qemu_flush_coalesced_mmio_buffer calls. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
		
							parent
							
								
									eb25a1d9d4
								
							
						
					
					
						commit
						c46860ea53
					
				| 
						 | 
				
			
			@ -2074,6 +2074,7 @@ static int qxl_init_primary(PCIDevice *dev)
 | 
			
		|||
             pci_address_space(dev), pci_address_space_io(dev), false);
 | 
			
		||||
    portio_list_init(qxl_vga_port_list, OBJECT(dev), qxl_vga_portio_list,
 | 
			
		||||
                     vga, "vga");
 | 
			
		||||
    portio_list_set_flush_coalesced(qxl_vga_port_list);
 | 
			
		||||
    portio_list_add(qxl_vga_port_list, pci_address_space_io(dev), 0x3b0);
 | 
			
		||||
 | 
			
		||||
    vga->con = graphic_console_init(DEVICE(dev), &qxl_ops, qxl);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -359,8 +359,6 @@ uint32_t vga_ioport_read(void *opaque, uint32_t addr)
 | 
			
		|||
    VGACommonState *s = opaque;
 | 
			
		||||
    int val, index;
 | 
			
		||||
 | 
			
		||||
    qemu_flush_coalesced_mmio_buffer();
 | 
			
		||||
 | 
			
		||||
    if (vga_ioport_invalid(s, addr)) {
 | 
			
		||||
        val = 0xff;
 | 
			
		||||
    } else {
 | 
			
		||||
| 
						 | 
				
			
			@ -453,8 +451,6 @@ void vga_ioport_write(void *opaque, uint32_t addr, uint32_t val)
 | 
			
		|||
    VGACommonState *s = opaque;
 | 
			
		||||
    int index;
 | 
			
		||||
 | 
			
		||||
    qemu_flush_coalesced_mmio_buffer();
 | 
			
		||||
 | 
			
		||||
    /* check port range access depending on color/monochrome mode */
 | 
			
		||||
    if (vga_ioport_invalid(s, addr)) {
 | 
			
		||||
        return;
 | 
			
		||||
| 
						 | 
				
			
			@ -2373,6 +2369,7 @@ void vga_init(VGACommonState *s, Object *obj, MemoryRegion *address_space,
 | 
			
		|||
    memory_region_set_coalescing(vga_io_memory);
 | 
			
		||||
    if (init_vga_ports) {
 | 
			
		||||
        portio_list_init(vga_port_list, obj, vga_ports, s, "vga");
 | 
			
		||||
        portio_list_set_flush_coalesced(vga_port_list);
 | 
			
		||||
        portio_list_add(vga_port_list, address_space_io, 0x3b0);
 | 
			
		||||
    }
 | 
			
		||||
    if (vbe_ports) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue