diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2010-01-10 13:52:53 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2010-01-11 13:40:59 -0600 |
commit | 8172539d21a03e982aa7f139ddc1607dc1422045 (patch) | |
tree | 67ceb2ca2ea245060d9285623e26e3a42b3cdc1a /hw/virtio-balloon.c | |
parent | 704a76fcd24372a683652651b4597f6654084975 (diff) |
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>
Diffstat (limited to 'hw/virtio-balloon.c')
-rw-r--r-- | hw/virtio-balloon.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/virtio-balloon.c b/hw/virtio-balloon.c index cfd3b413ff..e17880ff7c 100644 --- a/hw/virtio-balloon.c +++ b/hw/virtio-balloon.c @@ -124,9 +124,9 @@ static void virtio_balloon_set_config(VirtIODevice *vdev, dev->actual = config.actual; } -static uint32_t virtio_balloon_get_features(VirtIODevice *vdev) +static uint32_t virtio_balloon_get_features(VirtIODevice *vdev, uint32_t f) { - return 0; + return f; } static ram_addr_t virtio_balloon_to_target(void *opaque, ram_addr_t target) |