summaryrefslogtreecommitdiffstats
path: root/hw/virtio-blk.c
Commit message (Collapse)AuthorAgeFilesLines
* Virtio-blk qdev conversionPaul Brook2009-05-141-9/+10
| | | | Signed-off-by: Paul Brook <paul@codesourcery.com>
* Virtio-net qdev conversionPaul Brook2009-05-141-4/+8
| | | | Signed-off-by: Paul Brook <paul@codesourcery.com>
* virtio-blk: add SGI_IO passthru supportChristoph Hellwig2009-05-011-7/+116
| | | | | | | | | | | | | | | | | | [had the qemu list address wrong the first time, reply to this message, not the previous if you were on Cc] Add support for SG_IO passthru (packet commands) to the virtio-blk backend. Conceptually based on an older patch from Hannes Reinecke but largely rewritten to match the code structure and layering in virtio-blk. Note that currently we issue the hose SG_IO synchronously. We could easily switch to async I/O, but that would required either bloating the VirtIOBlockReq by the size of struct sg_io_hdr or an additional memory allocation for each SG_IO request. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* virtio-blk: use generic vectored I/O APIs (Christoph Hellwig)aliguori2009-03-281-71/+17
| | | | | | | | | | | | | Use the generic bdrv_aio_readv/bdrv_aio_writev APIs instead of linearizing buffers directly. This enables using the future native preadv/pwritev support. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6903 c046a42c-6fe2-441c-8c8c-71466251a162
* qemu: record devfn on block driver instance (Marcelo Tosatti)aliguori2009-02-111-0/+1
| | | | | | | | | | | Record PCIDev on the BlockDriverState structure to locate for release on hot-removal. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6597 c046a42c-6fe2-441c-8c8c-71466251a162
* hw: remove error handling from qemu_malloc() callers (Avi Kivity)aliguori2009-02-051-2/+1
| | | | | | | | Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6529 c046a42c-6fe2-441c-8c8c-71466251a162
* Add and use #defines for PCI device classesblueswir12009-02-011-1/+1
| | | | | | | | | | | | | This patch adds and uses #defines for PCI device classes and subclases, using a new pci_config_set_class() function, similar to the recently added pci_config_set_vendor_id() and pci_config_set_device_id(). Change since v1: fixed compilation of hw/sun4u.c Signed-off-by: Stuart Brady <stuart.brady@gmail.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6491 c046a42c-6fe2-441c-8c8c-71466251a162
* Use the default subsystem vendor ID for virtio devices (Mark McLoughlin)aliguori2009-01-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A subsystem vendor ID of zero isn't allowed, so we use our default ID. Gerd points out that although the PCI subsystem vendor ID is treated by the guest as the virtio vendor ID: /* we use the subsystem vendor/device id as the virtio vendor/device * id. this allows us to use the same PCI vendor/device id for all * virtio devices and to identify the particular virtio driver by * the subsytem ids */ vp_dev->vdev.id.vendor = pci_dev->subsystem_vendor; vp_dev->vdev.id.device = pci_dev->subsystem_device; it looks like only the device ID is used right now: # grep virtio modules.alias alias virtio:d00000001v* virtio_net alias virtio:d00000002v* virtio_blk alias virtio:d00000003v* virtio_console alias virtio:d00000004v* virtio-rng alias virtio:d00000005v* virtio_balloon alias pci:v00001AF4d*sv*sd*bc*sc*i* virtio_pci alias virtio:d00000009v* 9pnet_virtio so setting the subsystem vendor id to something != zero shouldn't cause trouble. Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6440 c046a42c-6fe2-441c-8c8c-71466251a162
* Stop VM on error in virtio-blk. (Gleb Natapov)aliguori2009-01-221-46/+124
| | | | | | | | Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6410 c046a42c-6fe2-441c-8c8c-71466251a162
* pci: virtio: use pci id defines (Gerd Hoffman)aliguori2008-12-111-3/+4
| | | | | | | | | | | | | Use the defines added by the previous patch in the virtio drivers. Also remove the pointless vendor and device args from the virtio_blk_init() function. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5987 c046a42c-6fe2-441c-8c8c-71466251a162
* Add virtio-blk supportaliguori2008-12-041-0/+248
Virtio-blk is a paravirtual block device based on VirtIO. It can be used by specifying the if=virtio parameter to the -drive parameter. When using -enable-kvm, it can achieve very good performance compared to IDE or SCSI. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5870 c046a42c-6fe2-441c-8c8c-71466251a162
OpenPOWER on IntegriCloud