From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1OB9Pa-0000iU-5F for qemu-devel@nongnu.org; Sun, 09 May 2010 12:31:26 -0400 Received: from [140.186.70.92] (port=48263 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OB9PY-0000iL-RK for qemu-devel@nongnu.org; Sun, 09 May 2010 12:31:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OB9PX-00067m-Fb for qemu-devel@nongnu.org; Sun, 09 May 2010 12:31:24 -0400 Received: from mail-vw0-f45.google.com ([209.85.212.45]:57331) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OB9PX-00067Y-Bv for qemu-devel@nongnu.org; Sun, 09 May 2010 12:31:23 -0400 Received: by vws8 with SMTP id 8so450121vws.4 for ; Sun, 09 May 2010 09:31:22 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20100509152349.GF24787@redhat.com> References: <20100509152349.GF24787@redhat.com> Date: Sun, 9 May 2010 17:31:16 +0100 Message-ID: From: Stefan Hajnoczi Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] Re: [SeaBIOS] [PATCH] Support for booting from virtio disks List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gleb Natapov Cc: seabios@seabios.org, qemu-devel@nongnu.org, kvm@vger.kernel.org On Sun, May 9, 2010 at 4:23 PM, Gleb Natapov wrote: Neat! I believe SeaBIOS will see virtio-blk devices as harddisks and not attempt to boot ISOs? Many existing OS installers probably cannot boot from virtio-blk, but in the longer term folks might like to get rid of ATAPI CD-ROMs in their VMs. > + =A0 =A0 =A0 =A0char *desc =3D malloc_tmphigh(MAXDESCSIZE); > + =A0 =A0 =A0 =A0struct virtiodrive_s *vdrive_g =3D malloc_fseg(sizeof(*v= drive_g)); > + =A0 =A0 =A0 =A0struct vring_virtqueue *vq =3D malloc_low(sizeof(*vq)); > + =A0 =A0 =A0 =A0if (!vdrive_g || !desc || !vq) { > + =A0 =A0 =A0 =A0 =A0 =A0warn_noalloc(); > + =A0 =A0 =A0 =A0 =A0 =A0return; > + =A0 =A0 =A0 =A0} [...] > + =A0 =A0 =A0 =A0if (vp_find_vq(ioaddr, 0, vdrive_g->vq) < 0 ) { > + =A0 =A0 =A0 =A0 =A0 =A0free(vdrive_g); > + =A0 =A0 =A0 =A0 =A0 =A0dprintf(1, "fail to find vq for virtio-blk %x:%x= \n", > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0pci_bdf_to_bus (bdf), pci_bdf_to= _dev(bdf)); > + =A0 =A0 =A0 =A0 =A0 =A0continue; > + =A0 =A0 =A0 =A0} Are desc, vdrive_g, and/or vq getting leaked on error? Stefan