All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 5/5] vga optimization.
Date: Tue, 11 Nov 2008 15:33:14 +0000	[thread overview]
Message-ID: <4919A5BA.40604@eu.citrix.com> (raw)
In-Reply-To: <49199A50.40504@codemonkey.ws>

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.

  reply	other threads:[~2008-11-11 15:29 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 [this message]
2008-11-11 15:33               ` Glauber Costa
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=4919A5BA.40604@eu.citrix.com \
    --to=stefano.stabellini@eu.citrix.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.