From: "Daniel P. Berrange" <berrange@redhat.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [Patch] VNC: Fix crash with non-resizing clients
Date: Wed, 3 Oct 2007 20:50:53 +0100 [thread overview]
Message-ID: <20071003195052.GF8342@redhat.com> (raw)
In-Reply-To: <83a4d4ca0710031229u68202e6aub32ba6257dfb0bc0@mail.gmail.com>
On Wed, Oct 03, 2007 at 09:29:59PM +0200, Eduardo Felipe wrote:
> Hi,
>
> 2007/9/25, GUERRAZ Francois <francois.guerraz@alyotech.fr>:
> >
> >
> > About your VNC problems : I have had problems w/ vnc too (see
> > http://qemu-forum.ipi.fi/viewtopic.php?p=10468) but had no answer as
> > well...
>
>
> This problem happens when the VNC client doesn't support the DesktopSize
> pseudo-encoding. Qemu crashes when the guest resizes down its display and
> the VNC client sends a SetPixelFormat afterwards.
>
> Attached patch should fix this. It also forces a full buffer update after
> resize.
The memset calls in that patch are bogus & not correctly fixing the buffer
update problem. You're merely setting the 'old data' to have pixel value
42 - if the guest OS framebuffer happens to also have aras with pixel value
of 42 too, the frame buffer will still not correctly update. The root
problem is overly-aggressive update minimization logic in vnc_update_client.
This is in turn flawed beause the dirty_row aray is trying to encode two
separate concepts - areas which are dirty, and areas which need to be
sent to the client. The latter are a superset of the former, but the code
in vnc_update_client minimizes based on dirtiness, so updates will get
missed out. Setting the old data to 42 merely changes which areas will get
missed updates.
The QEMU code in Xen has added a update_row field, separate from the dirty_row
field. Thus after a resize it can update the entire framebuffer, regardless
of whether QEMU's copy of the framebuffer is dirty wrt to the guest copy.
Dan.
--
|=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=|
|=- Perl modules: http://search.cpan.org/~danberr/ -=|
|=- Projects: http://freshmeat.net/~danielpb/ -=|
|=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|
next prev parent reply other threads:[~2007-10-03 19:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-03 19:29 [Qemu-devel] [Patch] VNC: Fix crash with non-resizing clients Eduardo Felipe
2007-10-03 19:50 ` Daniel P. Berrange [this message]
2007-10-03 21:00 ` Eduardo Felipe
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=20071003195052.GF8342@redhat.com \
--to=berrange@redhat.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).