virtio: add features as qdev properties
commit8172539d21a03e982aa7f139ddc1607dc1422045
authorMichael S. Tsirkin <mst@redhat.com>
Sun, 10 Jan 2010 11:52:53 +0000 (10 13:52 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Mon, 11 Jan 2010 19:40:59 +0000 (11 13:40 -0600)
tree67ceb2ca2ea245060d9285623e26e3a42b3cdc1a
parent704a76fcd24372a683652651b4597f6654084975
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
compatibility.  Since default values for optional features are now set by qdev,
get_features callback has been modified: it sets non-optional bits, and clears
bits not supported by host.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 files changed:
hw/s390-virtio-bus.c
hw/s390-virtio-bus.h
hw/syborg_virtio.c
hw/virtio-balloon.c
hw/virtio-blk.c
hw/virtio-blk.h
hw/virtio-console.c
hw/virtio-net.c
hw/virtio-net.h
hw/virtio-pci.c
hw/virtio.c
hw/virtio.h