[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v11 14/34] spapr_lian: add bootindex to qom property
From: |
arei.gonglei |
Subject: |
[Qemu-devel] [PATCH v11 14/34] spapr_lian: add bootindex to qom property |
Date: |
Tue, 7 Oct 2014 16:00:18 +0800 |
From: Gonglei <address@hidden>
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 <address@hidden>
Reviewed-by: Gerd Hoffmann <address@hidden>
---
hw/net/spapr_llan.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/hw/net/spapr_llan.c b/hw/net/spapr_llan.c
index 23c47d3..0ff159b 100644
--- a/hw/net/spapr_llan.c
+++ b/hw/net/spapr_llan.c
@@ -226,6 +226,15 @@ static int spapr_vlan_init(VIOsPAPRDevice *sdev)
return 0;
}
+static void spapr_vlan_instance_init(Object *obj)
+{
+ VIOsPAPRVLANDevice *dev = VIO_SPAPR_VLAN_DEVICE(obj);
+
+ device_add_bootindex_property(obj, &dev->nicconf.bootindex,
+ "bootindex", "",
+ DEVICE(dev), NULL);
+}
+
void spapr_vlan_create(VIOsPAPRBus *bus, NICInfo *nd)
{
DeviceState *dev;
@@ -553,6 +562,7 @@ static const TypeInfo spapr_vlan_info = {
.parent = TYPE_VIO_SPAPR_DEVICE,
.instance_size = sizeof(VIOsPAPRVLANDevice),
.class_init = spapr_vlan_class_init,
+ .instance_init = spapr_vlan_instance_init,
};
static void spapr_vlan_register_types(void)
--
1.7.12.4
- [Qemu-devel] [PATCH v11 00/34] modify boot order of guest, and take effect after rebooting, arei.gonglei, 2014/10/07
- [Qemu-devel] [PATCH v11 02/34] bootindex: add check bootindex function, arei.gonglei, 2014/10/07
- [Qemu-devel] [PATCH v11 07/34] bootindex: add a setter/getter functions wrapper for bootindex property, arei.gonglei, 2014/10/07
- [Qemu-devel] [PATCH v11 03/34] bootindex: add del_boot_device_path function, arei.gonglei, 2014/10/07
- [Qemu-devel] [PATCH v11 10/34] eepro100: add bootindex to qom property, arei.gonglei, 2014/10/07
- [Qemu-devel] [PATCH v11 08/34] virtio-net: add bootindex to qom property, arei.gonglei, 2014/10/07
- [Qemu-devel] [PATCH v11 11/34] ne2000: add bootindex to qom property, arei.gonglei, 2014/10/07
- [Qemu-devel] [PATCH v11 14/34] spapr_lian: add bootindex to qom property,
arei.gonglei <=
- [Qemu-devel] [PATCH v11 20/34] pci-assign: remove bootindex property from qdev to qom, arei.gonglei, 2014/10/07
- [Qemu-devel] [PATCH v11 13/34] rtl8139: add bootindex to qom property, arei.gonglei, 2014/10/07
- [Qemu-devel] [PATCH v11 18/34] virtio-net: alias bootindex property explicitly for virt-net-pci/ccw/s390, arei.gonglei, 2014/10/07
- [Qemu-devel] [PATCH v11 12/34] pcnet: add bootindex to qom property, arei.gonglei, 2014/10/07
- [Qemu-devel] [PATCH v11 19/34] host-libusb: remove bootindex property from qdev to qom, arei.gonglei, 2014/10/07
- [Qemu-devel] [PATCH v11 15/34] vmxnet3: add bootindex to qom property, arei.gonglei, 2014/10/07
- [Qemu-devel] [PATCH v11 01/34] bootdevice: move bootdevice related code to new file bootdevice.c, arei.gonglei, 2014/10/07
- [Qemu-devel] [PATCH v11 16/34] usb-net: add bootindex to qom property, arei.gonglei, 2014/10/07
- [Qemu-devel] [PATCH v11 31/34] ide: add calling add_boot_device_patch in bootindex setter function, arei.gonglei, 2014/10/07
- [Qemu-devel] [PATCH v11 09/34] e1000: add bootindex to qom property, arei.gonglei, 2014/10/07