diff options
author | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-11-24 20:21:41 +0000 |
---|---|---|
committer | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-11-24 20:21:41 +0000 |
commit | 2bec46dc97571a3c34b18fe4ca198e7bfbdca41f (patch) | |
tree | a005e29d9a7346047169901ae046ebe140b9990b /hw/vga_int.h | |
parent | 5832d1f2f51e1a1991c53ea98c535a619cf03001 (diff) | |
download | qemu-2bec46dc97571a3c34b18fe4ca198e7bfbdca41f.tar.gz qemu-2bec46dc97571a3c34b18fe4ca198e7bfbdca41f.tar.bz2 qemu-2bec46dc97571a3c34b18fe4ca198e7bfbdca41f.zip |
vga optimization (Glauber Costa)
Hypervisors like KVM perform badly while doing mmio on
a loop, because it'll generate an exit on each access.
This is the case with VGA, which results in very bad
performance.
In this patch, we map the linear frame buffer as RAM,
make sure it has dirty region tracking enabled, and then
just let the region to be written.
Cleanups suggestions by:
Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Glauber Costa <glommer@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5793 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/vga_int.h')
-rw-r--r-- | hw/vga_int.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/hw/vga_int.h b/hw/vga_int.h index 4fa619accd..b360d3e013 100644 --- a/hw/vga_int.h +++ b/hw/vga_int.h @@ -102,6 +102,11 @@ typedef void (* vga_update_retrace_info_fn)(struct VGAState *s); uint8_t *vram_ptr; \ ram_addr_t vram_offset; \ unsigned int vram_size; \ + uint32_t lfb_addr; \ + uint32_t lfb_end; \ + uint32_t map_addr; \ + uint32_t map_end; \ + uint32_t lfb_vram_mapped; /* whether 0xa0000 is mapped as ram */ \ unsigned long bios_offset; \ unsigned int bios_size; \ target_phys_addr_t base_ctrl; \ @@ -189,6 +194,10 @@ static inline int c6_to_8(int v) void vga_common_init(VGAState *s, DisplayState *ds, uint8_t *vga_ram_base, ram_addr_t vga_ram_offset, int vga_ram_size); void vga_init(VGAState *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); void vga_invalidate_scanlines(VGAState *s, int y1, int y2); |