From: "andrzej zaborowski" <balrogg@gmail.com>
To: Jan Niehusmann <jan@gondor.com>
Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org
Subject: [Qemu-devel] Re: [PATCH] Wrapper around dpy_copy to fix segfault with -vnc option
Date: Wed, 24 Sep 2008 04:27:02 +0200 [thread overview]
Message-ID: <fb249edb0809231927n7562e56dv512199d6b66deb75@mail.gmail.com> (raw)
In-Reply-To: <20080923152058.GA27742@jannic.reliablesolutions.de>
2008/9/23 Jan Niehusmann <jan@gondor.com>:
> On Mon, Sep 22, 2008 at 11:15:04PM +0200, andrzej zaborowski wrote:
>> Yes, I don't think hw/ code should be concerned with what console is
>> active. Logically the dpy_ functions should take the pointer returned
>> from graphic_console_init() as first parameter.
>>
>> Please also check the code is formatted consistently with qemu.
>>
>> I didn't receive Jan's message but the check seems to not be enough
>> because there can be multiple graphical consoles with different sizes
>> - if I'm guessing correctly what this patch tries to fix.
>
> Based on these comments I had another look at the code. If there can
> be multiple graphical consoles, the only sensible test is 'console
> == active_console' where console must be provided by the caller. So,
> indeed, a pointer to the console must be provided instead of a pointer
> to the DisplayState.
>
> To make function names consistent, I called the function qemu_console_copy
> in analogy to qemu_console_resize (which is a similar wrapper around
> dpy_resize).
I committed the patch slightly modified because I found this still
doesn't account for all the cases. Imagine ds->dpy_copy is not set,
the call does nothing and the screen is not updated until fully
invalidated. We need to either implement a generic dpy_copy in
console.c or have a fallback in hw/cirrus_vga.c depending on which is
faster.
Also note that till now hw/ files could only call into the ds->dpy_
functions from inside their own vga_hw_update callback, this
guaranteed some consistency. The use of dpy_copy inside cirrus_vga.c
changed this which is the source of these bugs. I hadn't noticed when
this happened.
Regards
prev parent reply other threads:[~2008-09-24 2:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-22 17:16 [Qemu-devel] [Patch] Segfault with -vnc option Jan Niehusmann
2008-09-22 18:08 ` [Qemu-devel] " Anthony Liguori
2008-09-22 21:15 ` andrzej zaborowski
2008-09-23 15:20 ` [Qemu-devel] [PATCH] Wrapper around dpy_copy to fix segfault " Jan Niehusmann
2008-09-24 2:27 ` andrzej zaborowski [this message]
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=fb249edb0809231927n7562e56dv512199d6b66deb75@mail.gmail.com \
--to=balrogg@gmail.com \
--cc=jan@gondor.com \
--cc=kvm@vger.kernel.org \
--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).