Statistics
| Branch: | Revision:

root / hw / virtio-blk.c @ ee4d45be

History | View | Annotate | Download (13 kB)

# Date Author Comment
9752c371 02/11/2010 12:53 am Christoph Hellwig

virtio-blk: add topology support

Export all topology information in the block config structure,
guarded by a new VIRTIO_BLK_F_TOPOLOGY feature flag.

Signed-off-by: Christoph Hellwig <>
Signed-off-by: Anthony Liguori <>

428c149b 02/11/2010 12:53 am Christoph Hellwig

block: add topology qdev properties

Add three new qdev properties to export block topology information to
the guest. This is needed to get optimal I/O alignment for RAID arrays
or SSDs.

The options are:

- physical_block_size to specify the physical block size of the device,...
37d5ddd6 02/11/2010 12:51 am hch@lst.de

virtio-blk: revert serial number support

The addition of the whole ATA IDENTIY page caused the config space to
go above the allowed size in the PCI spec, and thus the feature was
already reverted in the Linux guest driver and disabled by default in
qemu....

eaa6c85f 02/10/2010 07:57 pm Luiz Capitulino

virtio-blk: Generate BLOCK_IO_ERROR QMP event

Just call bdrv_mon_event() in the right place.

Signed-off-by: Luiz Capitulino <>
Signed-off-by: Anthony Liguori <>

f1b52868 01/29/2010 05:53 pm Kevin Wolf

virtio-blk: Fix restart after read error

Current code assumes that only write requests are ever going to be restarted.
This is wrong since rerror=stop exists. Instead of directly starting writes,
use the same request processing as used for new requests.
...

6c510fbf 01/29/2010 05:53 pm Kevin Wolf

virtio-blk: Fix error cases which ignored rerror/werror

If an I/O request fails right away instead of getting an error only in the
callback, we still need to consider rerror/werror.

Signed-off-by: Kevin Wolf <>
Signed-off-by: Anthony Liguori <>

bc6694d4 01/29/2010 05:53 pm Kevin Wolf

virtio_blk: Factor virtio_blk_handle_request out

We need a function that handles a single request. Create one by splitting out
code from virtio_blk_handle_output.

Signed-off-by: Kevin Wolf <>
Signed-off-by: Anthony Liguori <>

4277906d 01/14/2010 01:14 am Christoph Hellwig

virtio-blk: remove dead variable in virtio_blk_handle_scsi

As pointed out by clang size is only ever written to, but never actually
used.

Signed-off-by: Christoph Hellwig <>
Signed-off-by: Anthony Liguori <>

8172539d 01/11/2010 09:40 pm Michael S. Tsirkin

virtio: add features as qdev properties

Add feature bits as properties to virtio. This makes it possible to e.g. define
machine without indirect buffer support, which is required for 0.10
compatibility, or without hardware checksum support, which is required for 0.11...

f7850099 12/03/2009 07:45 pm Kevin Wolf

Rename DriveInfo.onerror to on_write_error

Either rename variables and functions to refer to write errors (which is what
they actually do) or introduce a parameter to distinguish reads and writes.

Signed-off-by: Kevin Wolf <>
Signed-off-by: Anthony Liguori <>

f35d68f0 12/03/2009 07:45 pm Kevin Wolf

virtio-blk: Implement rerror option

Signed-off-by: Kevin Wolf <>
Signed-off-by: Anthony Liguori <>

49c3c8dc 11/12/2009 07:23 pm Kevin Wolf

virtio-blk: Pass read errors to the guest

We need to signal not only write errors, but also read errors to the guest
driver. This fixes a regression introduced by 869a5c6d.

Signed-off-by: Kevin Wolf <>
Signed-off-by: Anthony Liguori <>

c79662f7 11/09/2009 04:43 pm Naphtali Sprei

Pass the drive's readonly attribute to the guest OS

Implemented for virtio-blk and for scsi

Signed-off-by: Naphtali Sprei <>
Signed-off-by: Anthony Liguori <>

56a14938 10/05/2009 05:32 pm Gerd Hoffmann

drive cleanup fixes.

Changes: * drive_uninit() wants a DriveInfo now. * drive_uninit() also calls bdrv_delete(),
so callers don't need to do that. * drive_uninit() calls are moved over to the ->exit()
callbacks, destroy_bdrvs() is zapped. * setting bdrv->private is not needed any more as the...

711bf3d9 09/11/2009 06:19 pm Michael S. Tsirkin

qemu: make virtio-blk PCI compliant by default

commit bf011293faaa7f87e4de83185931e7411b794128 made virtio-blk-pci not
PCI-compliant, since it makes region 0 (which is an i/o region)
size > 256, and, since PCI 2.1, i/o regions are limited to 256 bytes size....

aa659be3 09/11/2009 06:19 pm Christoph Hellwig

virtio-blk: add volatile writecache feature

Add a new VIRTIO_BLK_F_WCACHE feature to virtio-blk to indicate that we have
a volatile write cache that needs controlled flushing. Implement a
VIRTIO_BLK_T_FLUSH operation to flush it.

Signed-off-by: Christoph Hellwig <>...

91553dcc 09/11/2009 06:18 pm Kevin Wolf

virtio-blk: Use bdrv_aio_multiwrite

It is quite common for virtio-blk to submit more than one write request in a
row to the qemu block layer. Use bdrv_aio_multiwrite to allow block drivers to
optimize its handling of the requests.

Signed-off-by: Kevin Wolf <>...

87b245db 08/28/2009 04:30 am Christoph Hellwig

virtio-blk: handle NULL returns from bdrv_aio_{read, write}

The bdrv_aio_{read,write} routines can return a NULL pointer when the
I/O submission fails. Currently we ignore this and will wait forever
for an I/O completion and leading to a hang of the guest....

d176c495 08/10/2009 09:05 pm Gerd Hoffmann

qdev-ify virtio-blk.

First user of the new drive property. With this patch applied host
and guest config can be specified separately, like this:

-drive if=none,id=disk1,file=/path/to/disk.img
-device virtio-blk-pci,drive=disk1

You can set any property for virtio-blk-pci now. You can set the pci...

213189ab 07/30/2009 05:50 pm Markus Armbruster

Fix VM state change handlers running out of order

When a VM state change handler changes VM state, other VM state change
handlers can see the state transitions out of order.

bmdma_map(), scsi_disk_init() and virtio_blk_init() install VM state
change handlers to restart DMA. These handlers can vm_stop() by...

bf011293 06/24/2009 05:09 pm john cooper

Add serial number support for virtio_blk

[brought forward to current qemu-kvm.git]

This patch implements the missing qemu logic to
interpret a '-drive .. serial=XYZ ..' flag for
a virtio_blk device.

The serial number string is contained in a
skeletal IDENTIFY DEVICE data structure and...

5c5dafdc 06/16/2009 11:18 pm Gerd Hoffmann

virtio blk: fix warning.

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>

c7085da7 06/13/2009 04:20 pm Blue Swirl

Avoid gcc 4.4 warning about uninitialized field

Signed-off-by: Blue Swirl <>

53c25cea 05/18/2009 08:26 pm Paul Brook

Separate virtio PCI code

Split the PCI host bindings from the VRing transport implementation.

Signed-off-by: Paul Brook <>

07e3af9a 05/15/2009 12:35 am Paul Brook

Virtio-blk qdev conversion

Signed-off-by: Paul Brook <>

cf21e106 05/15/2009 12:35 am Paul Brook

Virtio-net qdev conversion

Signed-off-by: Paul Brook <>

1063b8b1 05/01/2009 05:44 pm Christoph Hellwig

virtio-blk: add SGI_IO passthru support

[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...

d28a1b6e 03/28/2009 07:46 pm aliguori

virtio-blk: use generic vectored I/O APIs (Christoph Hellwig)

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 <>...

b0a7b120 02/11/2009 05:20 pm aliguori

qemu: record devfn on block driver instance (Marcelo Tosatti)

Record PCIDev on the BlockDriverState structure to locate for release
on hot-removal.

Signed-off-by: Marcelo Tosatti <>
Signed-off-by: Anthony Liguori <>...

487414f1 02/06/2009 12:06 am aliguori

hw: remove error handling from qemu_malloc() callers (Avi Kivity)

Signed-off-by: Avi Kivity <>
Signed-off-by: Anthony Liguori <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6529 c046a42c-6fe2-441c-8c8c-71466251a162

173a543b 02/01/2009 09:26 pm blueswir1

Add and use #defines for PCI device classes

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...

99b3718e 01/26/2009 05:22 pm aliguori

Use the default subsystem vendor ID for virtio devices (Mark McLoughlin)

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...
869a5c6d 01/22/2009 09:52 pm aliguori

Stop VM on error in virtio-blk. (Gleb Natapov)

Signed-off-by: Gleb Natapov <>
Signed-off-by: Anthony Liguori <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6410 c046a42c-6fe2-441c-8c8c-71466251a162

9b32d5a5 12/11/2008 11:20 pm aliguori

pci: virtio: use pci id defines (Gerd Hoffman)

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 <>
Signed-off-by: Anthony Liguori <>...

6e02c38d 12/04/2008 09:52 pm aliguori

Add virtio-blk support

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 <>...