From: Anthony Liguori <anthony@codemonkey.ws>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 6/6] kvm: vga optimization.
Date: Wed, 19 Nov 2008 09:23:48 -0600 [thread overview]
Message-ID: <49242F84.2010809@codemonkey.ws> (raw)
In-Reply-To: <1227108377-8442-7-git-send-email-glommer@redhat.com>
Glauber Costa wrote:
> @@ -1383,6 +1400,7 @@ cirrus_hook_write_sr(CirrusVGAState * s, unsigned reg_index, int reg_value)
> reg_index, reg_value);
> #endif
> break;
> +
> case 0x17: // Configuration Readback and Extended Control
>
Please don't introduce stray whitespace.
> s->sr[reg_index] = (s->sr[reg_index] & 0x38) | (reg_value & 0xc7);
> cirrus_update_memory_access(s);
> @@ -1528,12 +1546,13 @@ cirrus_hook_write_gr(CirrusVGAState * s, unsigned reg_index, int reg_value)
> s->gr[reg_index] = reg_value;
> cirrus_update_bank_ptr(s, 0);
> cirrus_update_bank_ptr(s, 1);
> - break;
> + cirrus_update_memory_access(s);
> + break;
>
This formatting seems way off?
> case 0x0B:
> s->gr[reg_index] = reg_value;
> cirrus_update_bank_ptr(s, 0);
> cirrus_update_bank_ptr(s, 1);
> - cirrus_update_memory_access(s);
> + cirrus_update_memory_access(s);
> break;
>
And this is just a reformatting change. Please avoid these.
> case 0x10: // BGCOLOR 0x0000ff00
> case 0x11: // FGCOLOR 0x0000ff00
> @@ -2618,6 +2637,48 @@ static CPUWriteMemoryFunc *cirrus_linear_bitblt_write[3] = {
> cirrus_linear_bitblt_writel,
> };
>
> +static void map_linear_vram(CirrusVGAState *s)
> +{
> +
> + 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);
> + }
> +
> + if (!s->map_addr)
> + return;
> +
> + if (cirrus_lfb_is_mapped(s)) {
> + cpu_register_physical_memory(isa_mem_base + 0xa0000, 0x8000,
> + (s->vram_offset + s->cirrus_bank_base[0]) | IO_MEM_RAM);
> + cpu_register_physical_memory(isa_mem_base + 0xa8000, 0x8000,
> + (s->vram_offset + s->cirrus_bank_base[1]) | IO_MEM_RAM);
>
Isn't necessary to reregister 0xa0000 too?
> + if (kvm_enabled()) {
> + kvm_log_start(0xa0000, 0x8000);
> + kvm_log_start(0xa8000, 0x8000);
> + }
>
Why would you enable logging on a different region from what you've
registered? Shouldn't you enable logging on both regions? If we're
going to enable logging based on target_phys_addr_t instead of
ram_addr_t (and I think we should), then we should enable it on all
target_phys_addr_ts.
> + }
> + else {
>
This is formatted incorrectly.
>
> +
> /*
> * graphic modes
> */
>
More extra whitespace.
Regards,
Anthony Liguori
next prev parent reply other threads:[~2008-11-19 15:23 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-19 15:26 [Qemu-devel] [PATCH 0/6] New shot at VGA optimization Glauber Costa
2008-11-19 14:23 ` Avi Kivity
2008-11-19 14:34 ` Glauber Costa
2008-11-19 15:26 ` [Qemu-devel] [PATCH 1/6] kvm: memory aliasing support for kvm Glauber Costa
2008-11-19 15:07 ` Anthony Liguori
2008-11-19 15:26 ` [Qemu-devel] [PATCH 2/6] better type checking for vga Glauber Costa
2008-11-19 15:08 ` Anthony Liguori
2008-11-19 15:26 ` [Qemu-devel] [PATCH 3/6] move vga_io_address to VGA State Glauber Costa
2008-11-19 15:26 ` [Qemu-devel] [PATCH 4/6] kvm: de-register mem region for MMIO Glauber Costa
2008-11-19 15:10 ` Anthony Liguori
2008-11-19 15:26 ` [Qemu-devel] [PATCH 5/6] Introduce kvm logging interface Glauber Costa
2008-11-19 15:18 ` Anthony Liguori
2008-11-19 17:23 ` Glauber Costa
2008-11-19 17:51 ` Anthony Liguori
2008-11-19 15:26 ` [Qemu-devel] [PATCH 6/6] kvm: vga optimization Glauber Costa
2008-11-19 15:23 ` Anthony Liguori [this message]
2008-11-19 17:19 ` Glauber Costa
2008-11-19 17:26 ` Anthony Liguori
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=49242F84.2010809@codemonkey.ws \
--to=anthony@codemonkey.ws \
--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.