[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v7 19/28] pci-assign: remove bootindex property from
From: |
arei.gonglei |
Subject: |
[Qemu-devel] [PATCH v7 19/28] pci-assign: remove bootindex property from qdev to qom |
Date: |
Fri, 5 Sep 2014 16:37:27 +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>
---
hw/i386/kvm/pci-assign.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/hw/i386/kvm/pci-assign.c b/hw/i386/kvm/pci-assign.c
index 17c7d6dc..56f387b 100644
--- a/hw/i386/kvm/pci-assign.c
+++ b/hw/i386/kvm/pci-assign.c
@@ -1850,13 +1850,23 @@ 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);
+ object_property_set_int(obj, -1, "bootindex", 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 +1892,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 v7 00/28] modify boot order of guest, and take effect after rebooting, arei.gonglei, 2014/09/05
- [Qemu-devel] [PATCH v7 13/28] rtl8139: add bootindex to qom property, arei.gonglei, 2014/09/05
- [Qemu-devel] [PATCH v7 11/28] ne2000: add bootindex to qom property, arei.gonglei, 2014/09/05
- [Qemu-devel] [PATCH v7 15/28] vmxnet3: add bootindex to qom property, arei.gonglei, 2014/09/05
- [Qemu-devel] [PATCH v7 14/28] spapr_lian: add bootindex to qom property, arei.gonglei, 2014/09/05
- [Qemu-devel] [PATCH v7 19/28] pci-assign: remove bootindex property from qdev to qom,
arei.gonglei <=
- [Qemu-devel] [PATCH v7 18/28] host-libusb: remove bootindex property from qdev to qom, arei.gonglei, 2014/09/05
- [Qemu-devel] [PATCH v7 17/28] net: remove bootindex property from qdev to qom, arei.gonglei, 2014/09/05
- [Qemu-devel] [PATCH v7 16/28] usb-net: add bootindex to qom property, arei.gonglei, 2014/09/05
- [Qemu-devel] [PATCH v7 07/28] bootindex: add a setter/getter functions wrapper for bootindex property, arei.gonglei, 2014/09/05
- [Qemu-devel] [PATCH v7 03/28] bootindex: add del_boot_device_path function, arei.gonglei, 2014/09/05
- [Qemu-devel] [PATCH v7 20/28] vfio: remove bootindex property from qdev to qom, arei.gonglei, 2014/09/05
- [Qemu-devel] [PATCH v7 22/28] isa-fdc: remove bootindexA/B property from qdev to qom, arei.gonglei, 2014/09/05
- [Qemu-devel] [PATCH v7 23/28] scsi: add bootindex to qom property, arei.gonglei, 2014/09/05