[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v8 21/30] vfio: remove bootindex property from qdev
From: |
arei.gonglei |
Subject: |
[Qemu-devel] [PATCH v8 21/30] vfio: remove bootindex property from qdev to qom |
Date: |
Wed, 10 Sep 2014 20:04:15 +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/misc/vfio.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/hw/misc/vfio.c b/hw/misc/vfio.c
index 40dcaa6..761429e 100644
--- a/hw/misc/vfio.c
+++ b/hw/misc/vfio.c
@@ -4365,13 +4365,22 @@ post_reset:
vfio_pci_post_reset(vdev);
}
+static void vfio_instance_init(Object *obj)
+{
+ PCIDevice *pci_dev = PCI_DEVICE(obj);
+ VFIODevice *vdev = DO_UPCAST(VFIODevice, pdev, PCI_DEVICE(obj));
+
+ device_add_bootindex_property(obj, &vdev->bootindex,
+ "bootindex", NULL,
+ &pci_dev->qdev, NULL);
+}
+
static Property vfio_pci_dev_properties[] = {
DEFINE_PROP_PCI_HOST_DEVADDR("host", VFIODevice, host),
DEFINE_PROP_UINT32("x-intx-mmap-timeout-ms", VFIODevice,
intx.mmap_timeout, 1100),
DEFINE_PROP_BIT("x-vga", VFIODevice, features,
VFIO_FEATURE_ENABLE_VGA_BIT, false),
- DEFINE_PROP_INT32("bootindex", VFIODevice, bootindex, -1),
/*
* TODO - support passed fds... is this necessary?
* DEFINE_PROP_STRING("vfiofd", VFIODevice, vfiofd_name),
@@ -4407,6 +4416,7 @@ static const TypeInfo vfio_pci_dev_info = {
.parent = TYPE_PCI_DEVICE,
.instance_size = sizeof(VFIODevice),
.class_init = vfio_pci_dev_class_init,
+ .instance_init = vfio_instance_init,
};
static void register_vfio_pci_dev_type(void)
--
1.7.12.4
- [Qemu-devel] [PATCH v8 09/30] e1000: add bootindex to qom property, (continued)
- [Qemu-devel] [PATCH v8 09/30] e1000: add bootindex to qom property, arei.gonglei, 2014/09/10
- [Qemu-devel] [PATCH v8 15/30] vmxnet3: add bootindex to qom property, arei.gonglei, 2014/09/10
- [Qemu-devel] [PATCH v8 10/30] eepro100: add bootindex to qom property, arei.gonglei, 2014/09/10
- [Qemu-devel] [PATCH v8 18/30] virtio-net: alias bootindex property explicitly for virt-net-pci/ccw/s390, arei.gonglei, 2014/09/10
- [Qemu-devel] [PATCH v8 16/30] usb-net: add bootindex to qom property, arei.gonglei, 2014/09/10
- [Qemu-devel] [PATCH v8 19/30] host-libusb: remove bootindex property from qdev to qom, arei.gonglei, 2014/09/10
- [Qemu-devel] [PATCH v8 11/30] ne2000: add bootindex to qom property, arei.gonglei, 2014/09/10
- [Qemu-devel] [PATCH v8 20/30] pci-assign: remove bootindex property from qdev to qom, arei.gonglei, 2014/09/10
- [Qemu-devel] [PATCH v8 17/30] net: remove bootindex property from qdev to qom, arei.gonglei, 2014/09/10
- [Qemu-devel] [PATCH v8 14/30] spapr_lian: add bootindex to qom property, arei.gonglei, 2014/09/10
- [Qemu-devel] [PATCH v8 21/30] vfio: remove bootindex property from qdev to qom,
arei.gonglei <=
- [Qemu-devel] [PATCH v8 23/30] isa-fdc: remove bootindexA/B property from qdev to qom, arei.gonglei, 2014/09/10
- [Qemu-devel] [PATCH v8 22/30] redirect: remove bootindex property from qdev to qom, arei.gonglei, 2014/09/10
- [Qemu-devel] [PATCH v8 26/30] virtio-blk: add bootindex to qom property, arei.gonglei, 2014/09/10
- [Qemu-devel] [PATCH v8 27/30] block: remove bootindex property from qdev to qom, arei.gonglei, 2014/09/10
- [Qemu-devel] [PATCH v8 28/30] ide: add calling add_boot_device_patch in bootindex setter function, arei.gonglei, 2014/09/10
- [Qemu-devel] [PATCH v8 29/30] bootindex: move calling add_boot_device_patch to bootindex setter function, arei.gonglei, 2014/09/10
- [Qemu-devel] [PATCH v8 30/30] bootindex: delete bootindex when device is removed, arei.gonglei, 2014/09/10
- [Qemu-devel] [PATCH v8 13/30] rtl8139: add bootindex to qom property, arei.gonglei, 2014/09/10
- [Qemu-devel] [PATCH v8 07/30] bootindex: add a setter/getter functions wrapper for bootindex property, arei.gonglei, 2014/09/10
- [Qemu-devel] [PATCH v8 12/30] pcnet: add bootindex to qom property, arei.gonglei, 2014/09/10