[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v11 20/34] pci-assign: remove bootindex property fro
From: |
arei.gonglei |
Subject: |
[Qemu-devel] [PATCH v11 20/34] pci-assign: remove bootindex property from qdev to qom |
Date: |
Tue, 7 Oct 2014 16:00:24 +0800 |
From: Gonglei <address@hidden>
Remove bootindex form qdev property to qom, 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/i386/kvm/pci-assign.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/hw/i386/kvm/pci-assign.c b/hw/i386/kvm/pci-assign.c
index 13b9de0..1e976c8 100644
--- a/hw/i386/kvm/pci-assign.c
+++ b/hw/i386/kvm/pci-assign.c
@@ -1850,13 +1850,22 @@ static void assigned_exitfn(struct PCIDevice *pci_dev)
free_assigned_device(dev);
}
+static void assigned_dev_instance_init(Object *obj)
+{
+ PCIDevice *pci_dev = PCI_DEVICE(obj);
+ AssignedDevice *d = DO_UPCAST(AssignedDevice, dev, PCI_DEVICE(obj));
+
+ device_add_bootindex_property(obj, &d->bootindex,
+ "bootindex", NULL,
+ &pci_dev->qdev, NULL);
+}
+
static Property assigned_dev_properties[] = {
DEFINE_PROP_PCI_HOST_DEVADDR("host", AssignedDevice, host),
DEFINE_PROP_BIT("prefer_msi", AssignedDevice, features,
ASSIGNED_DEVICE_PREFER_MSI_BIT, false),
DEFINE_PROP_BIT("share_intx", AssignedDevice, features,
ASSIGNED_DEVICE_SHARE_INTX_BIT, true),
- DEFINE_PROP_INT32("bootindex", AssignedDevice, bootindex, -1),
DEFINE_PROP_STRING("configfd", AssignedDevice, configfd_name),
DEFINE_PROP_END_OF_LIST(),
};
@@ -1882,6 +1891,7 @@ static const TypeInfo assign_info = {
.parent = TYPE_PCI_DEVICE,
.instance_size = sizeof(AssignedDevice),
.class_init = assign_class_init,
+ .instance_init = assigned_dev_instance_init,
};
static void assign_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, 2014/10/07
- [Qemu-devel] [PATCH v11 20/34] pci-assign: remove bootindex property from qdev to qom,
arei.gonglei <=
- [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
- [Qemu-devel] [PATCH v11 06/34] bootindex: support to set a existent device's bootindex to -1, arei.gonglei, 2014/10/07