aboutsummaryrefslogtreecommitdiff
path: root/hw/net/virtio-net.c
diff options
context:
space:
mode:
authorGonglei <arei.gonglei@huawei.com>2014-10-07 16:00:12 +0800
committerGerd Hoffmann <kraxel@redhat.com>2014-10-15 09:52:53 +0200
commitaa4197c32337aac32b0ed2a37fdbd80a2c0bfaec (patch)
treeea98629755d9b188891e6014cad3a6a37c87ff67 /hw/net/virtio-net.c
parent12da30977813472b91f0ba1a69f9258bbe679b2e (diff)
downloadqemu-aa4197c32337aac32b0ed2a37fdbd80a2c0bfaec.zip
qemu-aa4197c32337aac32b0ed2a37fdbd80a2c0bfaec.tar.gz
qemu-aa4197c32337aac32b0ed2a37fdbd80a2c0bfaec.tar.bz2
virtio-net: add bootindex to qom property
Add a qom property with the same name 'bootindex', when we remove it form qdev property, things will continue to work just fine, and we can use qom features which are not supported by qdev property. Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/net/virtio-net.c')
-rw-r--r--hw/net/virtio-net.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index 2040eac..f5ead97 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/virtio-net.c
@@ -1714,6 +1714,9 @@ static void virtio_net_instance_init(Object *obj)
* Can be overriden with virtio_net_set_config_size.
*/
n->config_size = sizeof(struct virtio_net_config);
+ device_add_bootindex_property(obj, &n->nic_conf.bootindex,
+ "bootindex", "/ethernet-phy@0",
+ DEVICE(n), NULL);
}
static Property virtio_net_properties[] = {