From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=33051 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OwYeH-00075V-NJ for qemu-devel@nongnu.org; Fri, 17 Sep 2010 06:58:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OwYeG-0005YV-M5 for qemu-devel@nongnu.org; Fri, 17 Sep 2010 06:58:33 -0400 Received: from moutng.kundenserver.de ([212.227.17.9]:63859) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OwYeG-0005YG-AT for qemu-devel@nongnu.org; Fri, 17 Sep 2010 06:58:32 -0400 Message-ID: <4C9349CE.8080402@mail.berlios.de> Date: Fri, 17 Sep 2010 12:58:22 +0200 From: Stefan Weil MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] CMOS file support References: <1284645517-32743-1-git-send-email-mathias.krause@secunet.com> <4C924AB5.1030802@mail.berlios.de> <4C930DED.5050601@secunet.com> In-Reply-To: <4C930DED.5050601@secunet.com> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Mathias Krause Cc: qemu-devel@nongnu.org Am 17.09.2010 08:42, schrieb Mathias Krause: > Am 16.09.2010 18:49, Stefan Weil schrieb: >> The intention of this patch is ok. Loading CMOS with initial data >> is needed. I just want to add two questions / remarks how the >> implementation might be improved. >> >> Are there use cases where having a smaller CMOS size is better? >> For example, when I want to emulate a system with 128 byte CMOS? >> The size of CMOS could be derived from the size of the data >> or specified by an additional parameter. > > I cannot image cases where smaller sizes would be a benefit. The saved > disk space is negligible and you can always pad your CMOS configuration > uo to 256 bytes by filling the gap with zero bytes. If the system just > accesses the first 128 bytes the additional 128 zero bytes shouldn't hurt. > The benefit of smaller sizes is not saving RAM but precision of the emulation. A BIOS or an operating system might be designed to support CMOS with 128 bytes or 256 bytes and try guessing the size by probing (many systems do something like this for RAM or other memory types). Testing the support of the small CMOS will be impossible if the emulation always emulates 256 bytes. Filling the additional 128 bytes with zero bytes won't help because the system will access them successfully although writes should fail. >> Using QEMU's block devices instead of a simple file would be >> more consistent with the rest of QEMU and allow reading the >> CMOS data not only from a file but also from an URL or other >> sources. > > Thanks for the hint. Since this is my first contribution to the project > I'm not that familiar with the code. Looking at other places, e.g. how > the -kernel option gets handled, I just see FILE everywhere. Can you > give me some pointers how to use this interface? > > Thanks for the review! > > > Mathias >