From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: [PATCHv2] Support for booting from virtio disks Date: Mon, 10 May 2010 11:29:39 +0300 Message-ID: <20100510082939.GL24787@redhat.com> References: <20100510081118.GI24787@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: seabios@seabios.org, qemu-devel@nongnu.org, kvm@vger.kernel.org To: Stefan Hajnoczi Return-path: Received: from mx1.redhat.com ([209.132.183.28]:55137 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751311Ab0EJI3z convert rfc822-to-8bit (ORCPT ); Mon, 10 May 2010 04:29:55 -0400 Content-Disposition: inline In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On Mon, May 10, 2010 at 09:25:20AM +0100, Stefan Hajnoczi wrote: > > diff --git a/src/virtio-blk.c b/src/virtio-blk.c > > new file mode 100644 > > index 0000000..a41c336 > > --- /dev/null > > +++ b/src/virtio-blk.c > > @@ -0,0 +1,155 @@ > > +// Virtio blovl boot support. >=20 > Just noticed the "blovl" typo. >=20 > > + =9A =9A =9A =9Achar *desc =3D malloc_tmphigh(MAXDESCSIZE); > > + =9A =9A =9A =9Astruct virtiodrive_s *vdrive_g =3D malloc_fseg(siz= eof(*vdrive_g)); > > + =9A =9A =9A =9Astruct vring_virtqueue *vq =3D malloc_low(sizeof(*= vq)); > > + =9A =9A =9A =9Aif (!vdrive_g || !desc || !vq) { > > + =9A =9A =9A =9A =9A =9Awarn_noalloc(); > > + =9A =9A =9A =9A =9A =9Areturn; > > + =9A =9A =9A =9A} >=20 > This error return can still leak. >=20 Oh Gosh, programming is hard. Why don't we write bios in python? -- Gleb.