From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44666) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WijW6-0007w7-0z for qemu-devel@nongnu.org; Fri, 09 May 2014 08:03:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WijVw-0005N5-JW for qemu-devel@nongnu.org; Fri, 09 May 2014 08:03:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]:10134) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WijVw-0005MD-CF for qemu-devel@nongnu.org; Fri, 09 May 2014 08:02:56 -0400 Date: Fri, 9 May 2014 13:02:25 +0100 From: "Dr. David Alan Gilbert" Message-ID: <20140509120224.GB22335@work-vm> References: <1399630869-920-1-git-send-email-arei.gonglei@huawei.com> <20140509111807.GA22335@work-vm> <1399636479.5213.56.camel@nilsson.home.kraxel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1399636479.5213.56.camel@nilsson.home.kraxel.org> Subject: Re: [Qemu-devel] [PATCH] cirrus_vga: adding sanity check for vram size List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: weidong.huang@huawei.com, mst@redhat.com, qemu-devel@nongnu.org, arei.gonglei@huawei.com, pbonzini@redhat.com, afaerber@suse.de * Gerd Hoffmann (kraxel@redhat.com) wrote: > Hi, > > > virt-manager/libvirt seems to default to 9 MByte of Vram for cirrus, > > so this would break a lot of setups. > > It wouldn't. libvirt sticks that into the xml, but it doesn't set any > qemu parameters. The libvirt parameter actually predates the qemu > property for setting the size. Yeuch messy. > > Looking at datasheets on the web seems to say the chips actually went > > down to 1 MB or less. > > I have my doubts we emulate that correctly (register telling the guest > how much memory is actually there etc.). Also it is pretty much useless > these days, even the 4MB imply serious constrains when FullHD displays > are commonplace. Newer cirrus drivers such as the kernel's drm driver > are specifically written to qemu's cirrus cards, I have my doubs that > they are prepared to handle 1MB cirrus cards correctly. > > Bottom line: Allowing less than 4MB is asking for trouble for no good > reason ;) OK, so checking for 4MB/8MB/16MB is probably safe, and it also would have the benefit of shouting if someone fixed libvirt and it started trying to configure a 9MB version. Dave -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK