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: Stefan Hajnoczi
Subject: [Qemu-devel] Re: [SeaBIOS] [PATCH] Support for booting from virtio disks
Date: Sun, 9 May 2010 17:31:16 +0100

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.

> +        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?

Stefan




reply via email to

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