From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LnIgN-0007HN-LJ for qemu-devel@nongnu.org; Fri, 27 Mar 2009 16:29:39 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LnIgI-0007Fu-Rh for qemu-devel@nongnu.org; Fri, 27 Mar 2009 16:29:38 -0400 Received: from [199.232.76.173] (port=59796 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LnIgI-0007Fr-N8 for qemu-devel@nongnu.org; Fri, 27 Mar 2009 16:29:34 -0400 Received: from mail.gmx.net ([213.165.64.20]:58312) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1LnIgI-00048a-7C for qemu-devel@nongnu.org; Fri, 27 Mar 2009 16:29:34 -0400 Message-ID: <49CD372B.5090205@gmx.net> Date: Fri, 27 Mar 2009 21:29:31 +0100 From: Carl-Daniel Hailfinger MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] get roms more room. References: <1238175456-9816-1-git-send-email-glommer@redhat.com> In-Reply-To: <1238175456-9816-1-git-send-email-glommer@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aliguori@us.ibm.com On 27.03.2009 18:37, Glauber Costa wrote: > This patch increases by 50 % the size available for option roms. > The main motivator is that some roms grew bigger than the 64k we > currently allocate for them (Hey, it's 2009!) > > One example is the gpxe project, that produces some roms with 69k, > 70k, etc. The space proposed by this patch actually makes it as > big as 84k. Probably still a fit for some time. > > But there is no free lunch. This space must come from somewhere, > and we take it from vga rom space. Currently, our vga roms are > around 35k in size. With this patch, they will be limited to > 44k, instead of 64k, which seems reasonable to me. > As a firmware developer, I have to speak up here. Although I agree that option ROMs may be bigger than 64k, replacing one hardcoded magic limit with another hardcoded magic limit seems to be a bit questionable. If you really want to hardcode this instead of calculating it dynamically, please use at least some symbolic constants and tell the user to change the symbolic constants and recompile Qemu if he hits the size limit. This patch reduces the room for the VGA option ROM without checking for its size. If we perform option ROM size checks, we may as well not exclude the VGA option ROM from that check. AFAICS resuming an image created with the old memory layout will change option ROM location and may lead to crashes, but I'm not so sure about that. Regards, Carl-Daniel -- http://www.hailfinger.org/