Received: from eggs.gnu.org ([208.118.235.92]:56123) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UebQf-0001RP-IO for qemu-devel@nongnu.org; Mon, 20 May 2013 21:31:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UebQe-0004Ix-I9 for qemu-devel@nongnu.org; Mon, 20 May 2013 21:31:53 -0400 Received: from mail-yh0-x234.google.com ([2607:f8b0:4002:c01::234]:43339) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UebQe-0004It-ER for qemu-devel@nongnu.org; Mon, 20 May 2013 21:31:52 -0400 Received: by mail-yh0-f52.google.com with SMTP id z6so23935yhz.39 for ; Mon, 20 May 2013 18:31:51 -0700 (PDT) Date: Mon, 20 May 2013 21:31:49 -0400 From: Kevin O'Connor Message-ID: <20130521013149.GA17641@morn.localdomain> References: <20130516173422.20571.91890.malonedeb@gac.canonical.com> <51953162.3000107@redhat.com> <5195DB73.3030104@redhat.com> <87ehd5wqaq.fsf@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87ehd5wqaq.fsf@codemonkey.ws> Subject: Re: [Qemu-devel] [Bug 1180923] [NEW] unused memory filled with 0x00 instead of 0xFF List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Peter Maydell , Stefan Hajnoczi , Bug 1180923 <1180923@bugs.launchpad.net>, qemu-devel , TC1988 , Paolo Bonzini On Fri, May 17, 2013 at 10:59:25AM -0500, Anthony Liguori wrote: > Paolo Bonzini writes: > > So you can see it in three ways: > > > > 1) It's not a QEMU problem, but a firmware problem. You could initialize > > the UMBs with 0xFF in SeaBIOS for example. > > SeaBIOS is not supposed to do any initialization. Once it's RAM, > there's no guarantee of what the contents will be. The problem is that > it's supposed to be ROM. > > I doubt it's still there, but BIOSes often had an option to disable > ROM shadowing expressly because it breaks applications that assume that > this space is ROM after BIOS loads. > > Perhaps SeaBIOS could support such an option but we can't support it in > KVM at the moment. It would not be easy to make SeaBIOS work with a truly read-only rom. SeaBIOS is designed to store static settings in the f-segment (where it can be accessed relative to %cs at runtime), and undoing that would be quite difficult. However, it is not too difficult to make SeaBIOS turn the 0xc0000-0x100000 area into read-only memory after initialization. The biggest stumbling block is that SeaBIOS stores read/write variables in the e-segment today, but it's possible to store them at the end of the 640k region instead (I posted a patch for this at: http://www.seabios.org/pipermail/seabios/2013-February/005693.html ). Once the memory 0xc0000-0x100000 ram can be read-only, setting the pam registers to mark it as read-only and memset'ing the region to 0xff is straight forward. -Kevin