From patchwork Tue Feb 17 11:15:42 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?UmFkaW0gS3LEjW3DocWZ?= X-Patchwork-Id: 440559 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id F176F140281 for ; Tue, 17 Feb 2015 22:16:55 +1100 (AEDT) Received: from localhost ([::1]:44783 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YNg97-00075A-SD for incoming@patchwork.ozlabs.org; Tue, 17 Feb 2015 06:16:53 -0500 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 Received: from potion (dhcp-1-150.brq.redhat.com [10.34.1.150]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id t1HBFgEP027909; Tue, 17 Feb 2015 06:15:43 -0500 Received: by potion (sSMTP sendmail emulation); Tue, 17 Feb 2015 12:15:42 +0100 Date: Tue, 17 Feb 2015 12:15:42 +0100 From: Radim =?utf-8?B?S3LEjW3DocWZ?= To: Gerd Hoffmann 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-Disposition: inline In-Reply-To: <1424170295.6014.37.camel@nilsson.home.kraxel.org> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: qemu-devel@nongnu.org Subject: Re: [Qemu-devel] [PATCH 1/2] vga: abort instead of shrinking memory X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@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) */