aboutsummaryrefslogtreecommitdiff
path: root/hw/qdev.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2009-10-21 15:25:35 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-10-27 12:28:40 -0500
commit97b156213e0e38b29da4480a32d4ec33d14d3012 (patch)
tree051ed08c9332b8d80e852051176d0b28228eae03 /hw/qdev.c
parent254111ecc80501a7d5c0e82f78bfa5ca8749ae20 (diff)
virtio: use qdev properties for configuration.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/qdev.c')
-rw-r--r--hw/qdev.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/qdev.c b/hw/qdev.c
index b32dbfc1fa..e81d6621c1 100644
--- a/hw/qdev.c
+++ b/hw/qdev.c
@@ -390,6 +390,10 @@ void qdev_set_nic_properties(DeviceState *dev, NICInfo *nd)
qdev_prop_set_vlan(dev, "vlan", nd->vlan);
if (nd->netdev)
qdev_prop_set_netdev(dev, "netdev", nd->netdev);
+ if (nd->nvectors != NIC_NVECTORS_UNSPECIFIED &&
+ qdev_prop_exists(dev, "vectors")) {
+ qdev_prop_set_uint32(dev, "vectors", nd->nvectors);
+ }
}
static int next_block_unit[IF_COUNT];