From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=34416 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PmSf4-0000YP-6U for qemu-devel@nongnu.org; Mon, 07 Feb 2011 10:05:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PmSf3-00011r-5i for qemu-devel@nongnu.org; Mon, 07 Feb 2011 10:05:54 -0500 Received: from adelie.canonical.com ([91.189.90.139]:57470) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PmSf2-00011e-Vd for qemu-devel@nongnu.org; Mon, 07 Feb 2011 10:05:53 -0500 Received: from loganberry.canonical.com ([91.189.90.37]) by adelie.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1PmSf2-00057v-03 for ; Mon, 07 Feb 2011 15:05:52 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id F36B92E80CE for ; Mon, 7 Feb 2011 15:05:51 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Mon, 07 Feb 2011 14:58:20 -0000 From: Matthew Bloch Sender: bounces@canonical.com References: <20110207145820.11575.25260.malonedeb@soybean.canonical.com> Message-Id: <20110207145821.11575.72077.malone@soybean.canonical.com> Errors-To: bounces@canonical.com Subject: [Qemu-devel] [Bug 714629] Re: BIOS doesn't load when read() returns less than the full ROM length Reply-To: Bug 714629 <714629@bugs.launchpad.net> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org ** Patch added: "Fix loading of BIOS file over 9p/network filesystems" https://bugs.launchpad.net/bugs/714629/+attachment/1836057/+files/rom_re= ad.patch -- = You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/714629 Title: BIOS doesn't load when read() returns less than the full ROM length Status in QEMU: New Bug description: When qemu is running over a 9p filesystem (e.g. when running underneath -virtfs of another qemu), and probably some other network filesystems, it fails to read its BIOS image. This is because it uses a single low-level read() call on the bios.bin, asking for the full file. However read() may return less than the full length, and it's the caller's responsibility to call it repeatedly if necessary. When read does come up short, qemu doesn't repeat the call, and reports an error instead. The attached patch fixes the one problem I saw, but I haven't tried to cover the general case (e.g. extension ROMs).