From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45552) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YNg87-00063O-FO for qemu-devel@nongnu.org; Tue, 17 Feb 2015 06:15:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YNg82-0000Qx-CE for qemu-devel@nongnu.org; Tue, 17 Feb 2015 06:15:51 -0500 Received: from mx1.redhat.com ([209.132.183.28]:55541) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YNg82-0000Qj-60 for qemu-devel@nongnu.org; Tue, 17 Feb 2015 06:15:46 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t1HBFjtv004224 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Tue, 17 Feb 2015 06:15:45 -0500 Date: Tue, 17 Feb 2015 12:15:42 +0100 From: Radim =?utf-8?B?S3LEjW3DocWZ?= Message-ID: <20150217111541.GD4562@potion.brq.redhat.com> References: <1424121788-24560-1-git-send-email-rkrcmar@redhat.com> <1424121788-24560-2-git-send-email-rkrcmar@redhat.com> <1424160049.6014.4.camel@nilsson.home.kraxel.org> <20150217102928.GB4562@potion.brq.redhat.com> <1424169456.6014.34.camel@nilsson.home.kraxel.org> <20150217104802.GC4562@potion.brq.redhat.com> <1424170295.6014.37.camel@nilsson.home.kraxel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1424170295.6014.37.camel@nilsson.home.kraxel.org> 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: Gerd Hoffmann Cc: qemu-devel@nongnu.org 2015-02-17 11:51+0100, Gerd Hoffmann: > Hi, > > > > Which command line triggers it? > > > > The important subset is: > > -vga qxl -global qxl-vga.vgamem_mb=512 > > Ah, so the problem is only one place enforces a upper limit, so we can > get an invalid configuration with large values. (I think that hardcoding the limit at two unrelated places is bad -- nothing in the code has improved since the first bug.) > Can you try the attached patch? It doesn't crash, but spice doesn't work when setting vgamem that high, and there is no reason to anyway, so the attached hunk would be better. Thanks. --- diff --git a/hw/display/qxl.c b/hw/display/qxl.c index 61df47726481..3c55aa6479d4 100644 --- a/hw/display/qxl.c +++ b/hw/display/qxl.c @@ -1880,6 +1880,9 @@ static void qxl_init_ramsize(PCIQXLDevice *qxl) if (qxl->vgamem_size_mb < 8) { qxl->vgamem_size_mb = 8; } + if (qxl->vgamem_size_mb > 128) { + qxl->vgamem_size_mb = 128; + } qxl->vgamem_size = qxl->vgamem_size_mb * 1024 * 1024; /* vga ram (bar 0, total) */