From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37617) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YNd5U-00026p-J6 for qemu-devel@nongnu.org; Tue, 17 Feb 2015 03:00:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YNd5R-0005PV-Do for qemu-devel@nongnu.org; Tue, 17 Feb 2015 03:00:56 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60782) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YNd5R-0005PP-6B for qemu-devel@nongnu.org; Tue, 17 Feb 2015 03:00:53 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t1H80pkW003622 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Tue, 17 Feb 2015 03:00:52 -0500 Message-ID: <1424160049.6014.4.camel@nilsson.home.kraxel.org> From: Gerd Hoffmann Date: Tue, 17 Feb 2015 09:00:49 +0100 In-Reply-To: <1424121788-24560-2-git-send-email-rkrcmar@redhat.com> References: <1424121788-24560-1-git-send-email-rkrcmar@redhat.com> <1424121788-24560-2-git-send-email-rkrcmar@redhat.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 1/2] vga: abort instead of shrinking memory List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Radim =?UTF-8?Q?Kr=C4=8Dm=C3=A1=C5=99?= Cc: qemu-devel@nongnu.org On Mo, 2015-02-16 at 22:23 +0100, Radim Kr=C4=8Dm=C3=A1=C5=99 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? > 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. Also the loop you are removing makes sure vram_size is a power of two, removing that is not correct too. cheers, Gerd