From: "Glauber Costa" <glommer@gmail.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 5/5] vga optimization.
Date: Tue, 11 Nov 2008 13:33:24 -0200 [thread overview]
Message-ID: <5d6222a80811110733p471c5603jb2e510aeadd3f587@mail.gmail.com> (raw)
In-Reply-To: <4919A5BA.40604@eu.citrix.com>
On Tue, Nov 11, 2008 at 1:33 PM, Stefano Stabellini
<stefano.stabellini@eu.citrix.com> 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."
next prev parent reply other threads:[~2008-11-11 15:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-11 2:16 [Qemu-devel] [PATCH 0/5] VGA Optimization Episode IV - A new hope Glauber Costa
2008-11-11 2:16 ` [Qemu-devel] [PATCH 1/5] better type checking for vga Glauber Costa
2008-11-11 2:16 ` [Qemu-devel] [PATCH 2/5] move vga_io_address to VGA State Glauber Costa
2008-11-11 2:16 ` [Qemu-devel] [PATCH 3/5] de-register mem region for MMIO Glauber Costa
2008-11-11 2:16 ` [Qemu-devel] [PATCH 4/5] Introduce kvm logging interface Glauber Costa
2008-11-11 2:16 ` [Qemu-devel] [PATCH 5/5] vga optimization Glauber Costa
2008-11-11 14:44 ` Anthony Liguori
2008-11-11 15:33 ` Stefano Stabellini
2008-11-11 15:33 ` Glauber Costa [this message]
2008-11-11 15:50 ` Stefano Stabellini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5d6222a80811110733p471c5603jb2e510aeadd3f587@mail.gmail.com \
--to=glommer@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).