Re: [Qemu-devel] [PATCH 2/2] Virtio block device support
Hollis Blanchard wrote: On Tue, 2008-11-25 at 15:57 -0600, Anthony Liguori wrote: diff --git a/hw/pc.h b/hw/pc.h index f156b9e..bbfa2d6 100644 --- a/hw/pc.h +++ b/hw/pc.h @@ -152,4 +152,8 @@ void pci_piix4_ide_init(PCIBus *bus, BlockDriverState **hd_table, int devfn, void isa_ne2000_init(int base, qemu_irq irq, NICInfo *nd); +/* virtio-blk.c */ +void *virtio_blk_init(PCIBus *bus, uint16_t vendor, uint16_t device, + BlockDriverState *bs); + #endif This shouldn't be in pc.h. I don't disagree. I don't know if you'd consider virtio.h to be a layering violation, but the virtio layers are already being compressed in these patches... Yeah, I think the virtio stuff could use some love but I'd like to avoid that until we have something in tree and merged against kvm-userspace. Regards, Anthony Liguori -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [Qemu-devel] [PATCH 2/2] Virtio block device support
On Tue, 2008-11-25 at 15:57 -0600, Anthony Liguori wrote: > diff --git a/hw/pc.h b/hw/pc.h > index f156b9e..bbfa2d6 100644 > --- a/hw/pc.h > +++ b/hw/pc.h > @@ -152,4 +152,8 @@ void pci_piix4_ide_init(PCIBus *bus, > BlockDriverState **hd_table, int devfn, > > void isa_ne2000_init(int base, qemu_irq irq, NICInfo *nd); > > +/* virtio-blk.c */ > +void *virtio_blk_init(PCIBus *bus, uint16_t vendor, uint16_t device, > + BlockDriverState *bs); > + > #endif This shouldn't be in pc.h. I don't know if you'd consider virtio.h to be a layering violation, but the virtio layers are already being compressed in these patches... -- Hollis Blanchard IBM Linux Technology Center -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [Qemu-devel] [PATCH 2/2] Virtio block device support
On Tue, 2008-11-25 at 15:57 -0600, Anthony Liguori wrote: > This has been posted before but I believe it now has addressed all outstanding > concerns. I'd like to apply it if there are no objections. > > This patch adds virtio-blk support to QEMU. virtio-blk is a paravirtual disk > controller that can achieve good performance when using KVM. > > Since virtio is based on a scatter/gather API, we don't have a linear buffer > for each request. This forces us to allocate a linear buffer since the > current > block driver API does not have a scatter/gather operation. This allocation > can never exceed the maximum data limit on the ring queue so it isn't > unbounded. > > posix-aio cannot support a scatter/gather asynchronous operation so we'll need > to introduce our own thread pool to eliminate this limitation. There is work > underway to do this. > > Signed-off-by: Anthony Liguori <[EMAIL PROTECTED]> Tested and working (in conjunction with the virtio page size patch I just posted). -- Hollis Blanchard IBM Linux Technology Center -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html