qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [SeaBIOS] [PATCH] Support for booting from virtio disks


From: Gleb Natapov
Subject: [Qemu-devel] Re: [SeaBIOS] [PATCH] Support for booting from virtio disks
Date: Sun, 9 May 2010 19:47:18 +0300

On Sun, May 09, 2010 at 05:31:16PM +0100, Stefan Hajnoczi wrote:
> On Sun, May 9, 2010 at 4:23 PM, Gleb Natapov <address@hidden> 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.
> 
The patch assumes that all virtio-blk devices are disks and it can boot
from any of virtio-blk disks if there is more then one. I am not sure
CDROM can be attached via virtio-blk interface.

> > +        char *desc = malloc_tmphigh(MAXDESCSIZE);
> > +        struct virtiodrive_s *vdrive_g = malloc_fseg(sizeof(*vdrive_g));
> > +        struct vring_virtqueue *vq = malloc_low(sizeof(*vq));
> > +        if (!vdrive_g || !desc || !vq) {
> > +            warn_noalloc();
> > +            return;
> > +        }
> [...]
> > +        if (vp_find_vq(ioaddr, 0, vdrive_g->vq) < 0 ) {
> > +            free(vdrive_g);
> > +            dprintf(1, "fail to find vq for virtio-blk %x:%x\n",
> > +                    pci_bdf_to_bus (bdf), pci_bdf_to_dev(bdf));
> > +            continue;
> > +        }
> 
> Are desc, vdrive_g, and/or vq getting leaked on error?
> 
vdrive_g is freed, but desc and vq are leaked. Will fix. Thanks!

--
                        Gleb.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]