From: Marcelo Tosatti <mtosatti@redhat.com>
To: Anthony Liguori <aliguori@us.ibm.com>, Alan Pevec <apevec@redhat.com>
Cc: kvm-devel <kvm-devel@lists.sourceforge.net>
Subject: cirrusfb division by zero
Date: Wed, 30 Apr 2008 13:36:40 -0300 [thread overview]
Message-ID: <20080430163640.GB25309@dmt> (raw)
Anthony,
The following sequence crashes F9 guests, when using VNC:
# modprobe cirrusfb
# vbetool post
Results in Floating point exception at:
cirrus_do_copy()
{
depth = s->get_bpp((VGAState *)s) / 8
...
sx = (src % (width * depth)) / depth;
...
}
Problem is that ->get_bpp returns 0.
Following band-aid "fixes it" (coff). I have no idea if its correct
though ?
"vbetool post" corrupts both SDL and VNC displays when using cirrusfb,
but seems a separate problem.
diff --git a/qemu/hw/cirrus_vga.c b/qemu/hw/cirrus_vga.c
index e14ec35..9f860ff 100644
--- a/qemu/hw/cirrus_vga.c
+++ b/qemu/hw/cirrus_vga.c
@@ -709,6 +709,8 @@ static void cirrus_do_copy(CirrusVGAState *s, int dst, int src, int w, in int notify = 0;
depth = s->get_bpp((VGAState *)s) / 8;
+ if (!depth)
+ depth = 1;
s->get_resolution((VGAState *)s, &width, &height);
/* extra x, y */
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
next reply other threads:[~2008-04-30 16:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-30 16:36 Marcelo Tosatti [this message]
2008-04-30 18:08 ` cirrusfb division by zero 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=20080430163640.GB25309@dmt \
--to=mtosatti@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=apevec@redhat.com \
--cc=kvm-devel@lists.sourceforge.net \
/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.