From: "Radim Krčmář" <rkrcmar@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/2] vga: abort instead of shrinking memory
Date: Tue, 17 Feb 2015 11:29:28 +0100 [thread overview]
Message-ID: <20150217102928.GB4562@potion.brq.redhat.com> (raw)
In-Reply-To: <1424160049.6014.4.camel@nilsson.home.kraxel.org>
2015-02-17 09:00+0100, Gerd Hoffmann:
> On Mo, 2015-02-16 at 22:23 +0100, Radim Krčmář wrote:
> > Automatic shrinking of vram_size leads to a segfault, because other
> > variables depend on being smaller and don't get shrinked.
>
> --verbose please. Which other variables?
I'm sorry, at least rom->surface0_area_size.
(It is sourced from qxl->vgamem_size.)
rom->surface0_area_size shouldn't be bigger than qxl->vga.vram_size,
because it accesses memory allocated by it.
> > Implications of shrinking would make the code needlessly complicated;
> > assert instead.
>
> assert isn't an option. vram_size_mb may come from the user (via vga
> device properties), so we need a friendly error message here.
Agreed, it would require a lot of code to do it though (in cover letter)
... what about just dropping [1/2]? :) ([2/2] does the same job)
> Also the loop you are removing makes sure vram_size is a power of two,
> removing that is not correct too.
(True, the patch should have asserted that as well.)
next prev parent reply other threads:[~2015-02-17 10:29 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-16 21:23 [Qemu-devel] [PATCH 0/2] vga: assert to "solve" qxl bug Radim Krčmář
2015-02-16 21:23 ` [Qemu-devel] [PATCH 1/2] vga: abort instead of shrinking memory Radim Krčmář
2015-02-17 8:00 ` Gerd Hoffmann
2015-02-17 10:29 ` Radim Krčmář [this message]
2015-02-17 10:37 ` Gerd Hoffmann
2015-02-17 10:48 ` Radim Krčmář
2015-02-17 10:51 ` Gerd Hoffmann
2015-02-17 11:15 ` Radim Krčmář
2015-02-16 21:23 ` [Qemu-devel] [PATCH 2/2] qxl: surface0 and ram_header should fit into vram Radim Krčmář
2015-02-17 8:02 ` Gerd Hoffmann
2015-02-17 10:31 ` Radim Krčmář
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=20150217102928.GB4562@potion.brq.redhat.com \
--to=rkrcmar@redhat.com \
--cc=kraxel@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 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.