[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 5/5] vga optimization.
From: |
Glauber Costa |
Subject: |
Re: [Qemu-devel] [PATCH 5/5] vga optimization. |
Date: |
Tue, 11 Nov 2008 13:33:24 -0200 |
On Tue, Nov 11, 2008 at 1:33 PM, Stefano Stabellini
<address@hidden> wrote:
> Anthony Liguori wrote:
>>Glauber Costa wrote:
>>> +static void map_linear_vram(CirrusVGAState *s)
>>> +{
>>> + int phys_offset = s->vga_io_memory;
>>> +
>>> + if (!s->map_addr && s->lfb_addr && s->lfb_end) {
>>> + s->map_addr = s->lfb_addr;
>>> + s->map_end = s->lfb_end;
>>> + cpu_register_physical_memory(s->map_addr, s->map_end -
>>> s->map_addr, s->vram_offset);
>>> + vga_dirty_log_start((VGAState *)s);
>>>
>>
>>So you register this region and enable dirty tracking.
>
> I don't think it should be enabled here.
>
>>> + }
>>> +
>>> + if(!(s->cirrus_srcptr != s->cirrus_srcptr_end)
>>> + && !((s->sr[0x07] & 0x01) == 0)
>>> + && !((s->gr[0x0B] & 0x14) == 0x14)
>>> + && !(s->gr[0x0B] & 0x02)) {
>>> + phys_offset = s->vram_offset | IO_MEM_RAM;
>>> + }
>>> + cpu_register_physical_memory(isa_mem_base + 0xa0000, 0x20000,
>>> phys_offset);
>>>
>>
>>But also potentially change 0xa0000..0xc0000 to RAM, but you don't
>>enable dirty tracking on this region. I think you either have to leave
>>this region as MMIO or enable dirty tracking on it too.
>>
>
> To be honest I don't understand why this is part is needed.
>
> @@ -2102,6 +2122,11 @@ static void vga_map(PCIDevice *pci_dev, int region_num,
> } else {
> cpu_register_physical_memory(addr, s->vram_size, s->vram_offset);
> }
> +
> + s->map_addr = addr;
> + s->map_end = addr + VGA_RAM_SIZE;
> +
> + vga_dirty_log_start(s);
> }
>
> I think you should set lfb_addr and lfb_end here instead of map_addr and
> map_end.
>
It is possible for the lfb to be set, but not mapped.
So map_addr is what really indicates we're interested in tracking this region.
Or I am totally wrong?
--
Glauber Costa.
"Free as in Freedom"
http://glommer.net
"The less confident you are, the more serious you have to act."
- [Qemu-devel] [PATCH 0/5] VGA Optimization Episode IV - A new hope, Glauber Costa, 2008/11/10
- [Qemu-devel] [PATCH 1/5] better type checking for vga, Glauber Costa, 2008/11/10
- [Qemu-devel] [PATCH 2/5] move vga_io_address to VGA State, Glauber Costa, 2008/11/10
- [Qemu-devel] [PATCH 3/5] de-register mem region for MMIO., Glauber Costa, 2008/11/10
- [Qemu-devel] [PATCH 4/5] Introduce kvm logging interface., Glauber Costa, 2008/11/10
- [Qemu-devel] [PATCH 5/5] vga optimization., Glauber Costa, 2008/11/10
- Re: [Qemu-devel] [PATCH 5/5] vga optimization., Anthony Liguori, 2008/11/11
- Re: [Qemu-devel] [PATCH 5/5] vga optimization., Stefano Stabellini, 2008/11/11
- Re: [Qemu-devel] [PATCH 5/5] vga optimization.,
Glauber Costa <=
- Re: [Qemu-devel] [PATCH 5/5] vga optimization., Stefano Stabellini, 2008/11/11