[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC v4 23/58] vga: convert vga and its derivatives to
From: |
Jan Kiszka |
Subject: |
Re: [Qemu-devel] [RFC v4 23/58] vga: convert vga and its derivatives to the memory API |
Date: |
Wed, 20 Jul 2011 16:05:35 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 |
On 2011-07-17 13:13, Avi Kivity wrote:
> Convert all vga memory to the memory API. Note we need to fall back to
> get_system_memory(), since the various buses don't pass the vga window
> as a memory region.
>
> Signed-off-by: Avi Kivity <address@hidden>
> ---
> hw/cirrus_vga.c | 345
> +++++++++++++++++++++++++++++++++----------------------
> hw/qxl-render.c | 2 +-
> hw/qxl.c | 131 ++++++++--------------
> hw/qxl.h | 6 +-
> hw/vga-isa-mm.c | 45 +++++---
> hw/vga-isa.c | 11 +-
> hw/vga-pci.c | 28 +----
> hw/vga.c | 146 +++++++++++-------------
> hw/vga_int.h | 15 +--
> hw/vmware_vga.c | 143 ++++++++++++-----------
> 10 files changed, 439 insertions(+), 433 deletions(-)
>
> diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c
> index f39d1f8..0cd2aee 100644
> --- a/hw/cirrus_vga.c
> +++ b/hw/cirrus_vga.c
> @@ -200,9 +200,14 @@ typedef void (*cirrus_fill_t)(struct CirrusVGAState *s,
> typedef struct CirrusVGAState {
> VGACommonState vga;
>
> - int cirrus_linear_io_addr;
> - int cirrus_linear_bitblt_io_addr;
> - int cirrus_mmio_io_addr;
> + MemoryRegion cirrus_linear_io;
> + MemoryRegion cirrus_linear_bitblt_io;
> + MemoryRegion cirrus_mmio_io;
> + MemoryRegion pci_bar;
> + bool linear_vram; /* vga.vram mapped over cirrus_linear_io */
> + MemoryRegion low_mem_container; /* container for 0xa0000-0xc0000 */
> + MemoryRegion low_mem; /* always mapped, overridden by: */
> + MemoryRegion *cirrus_bank[2]; /* aliases at 0xa0000-0xb0000 */
> uint32_t cirrus_addr_mask;
> uint32_t linear_mmio_mask;
> uint8_t cirrus_shadow_gr0;
> @@ -612,7 +617,7 @@ static void cirrus_invalidate_region(CirrusVGAState * s,
> int off_begin,
> off_cur_end = (off_cur + bytesperline) & s->cirrus_addr_mask;
> off_cur &= TARGET_PAGE_MASK;
> while (off_cur < off_cur_end) {
> - cpu_physical_memory_set_dirty(s->vga.vram_offset + off_cur);
> + memory_region_set_dirty(&s->vga.vram, off_cur);
> off_cur += TARGET_PAGE_SIZE;
> }
> off_begin += off_pitch;
> @@ -1177,12 +1182,6 @@ static void cirrus_update_bank_ptr(CirrusVGAState * s,
> unsigned bank_index)
> }
>
> if (limit > 0) {
> - /* Thinking about changing bank base? First, drop the dirty bitmap
> information
> - * on the current location, otherwise we lose this pointer forever */
> - if (s->vga.lfb_vram_mapped) {
> - target_phys_addr_t base_addr = isa_mem_base + 0xa0000 +
> bank_index * 0x8000;
> - cpu_physical_sync_dirty_bitmap(base_addr, base_addr + 0x8000);
> - }
Why is it safe to drop this?
Jan
--
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
- [Qemu-devel] [RFC v4 49/58] sun4u: convert to memory API, (continued)
- [Qemu-devel] [RFC v4 49/58] sun4u: convert to memory API, Avi Kivity, 2011/07/17
- [Qemu-devel] [RFC v4 17/58] pci: pass address space to pci bus when created, Avi Kivity, 2011/07/17
- [Qemu-devel] [RFC v4 38/58] ide: convert to memory API, Avi Kivity, 2011/07/17
- [Qemu-devel] [RFC v4 45/58] ne2000: convert to memory API, Avi Kivity, 2011/07/17
- [Qemu-devel] [RFC v4 39/58] ivshmem: convert to memory API, Avi Kivity, 2011/07/17
- [Qemu-devel] [RFC v4 58/58] pci: rename pci_register_bar_region() to pci_register_bar(), Avi Kivity, 2011/07/17
- [Qemu-devel] [RFC v4 56/58] pci: remove pci_register_bar(), Avi Kivity, 2011/07/17
- [Qemu-devel] [RFC v4 44/58] ppc: convert to memory API, Avi Kivity, 2011/07/17
- [Qemu-devel] [RFC v4 31/58] pci: pass I/O address space to new PCI bus, Avi Kivity, 2011/07/17
- [Qemu-devel] [RFC v4 23/58] vga: convert vga and its derivatives to the memory API, Avi Kivity, 2011/07/17
- Re: [Qemu-devel] [RFC v4 23/58] vga: convert vga and its derivatives to the memory API,
Jan Kiszka <=
- Re: [Qemu-devel] [RFC v4 23/58] vga: convert vga and its derivatives to the memory API, Avi Kivity, 2011/07/20
- Re: [Qemu-devel] [RFC v4 23/58] vga: convert vga and its derivatives to the memory API, Jan Kiszka, 2011/07/20
- Re: [Qemu-devel] [RFC v4 23/58] vga: convert vga and its derivatives to the memory API, Avi Kivity, 2011/07/20
- Re: [Qemu-devel] [RFC v4 23/58] vga: convert vga and its derivatives to the memory API, Jan Kiszka, 2011/07/20
- Re: [Qemu-devel] [RFC v4 23/58] vga: convert vga and its derivatives to the memory API, Avi Kivity, 2011/07/20
Re: [Qemu-devel] [RFC v4 00/58] Memory API, Anthony Liguori, 2011/07/19