Blob Blame History Raw
From 394cb4371862245164782e8a98910bc78f90c629 Mon Sep 17 00:00:00 2001
From: Alex Williamson <alex.williamson@redhat.com>
Date: Fri, 29 Sep 2017 21:45:24 +0200
Subject: [PATCH 10/27] vfio: remove bootindex property from qdev to qom

RH-Author: Alex Williamson <alex.williamson@redhat.com>
Message-id: <20170929214524.16765.24180.stgit@gimli.home>
Patchwork-id: 76767
O-Subject: [RHEL-7.5 qemu-kvm PATCH 10/16] vfio: remove bootindex property from qdev to qom
Bugzilla: 1494181
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
RH-Acked-by: Auger Eric <eric.auger@redhat.com>
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>

From: Gonglei <arei.gonglei@huawei.com>

Upstream: abc5b3bfe1c77ad622188341d1ee4d49de308ae3
RHEL: Only taking the instance_init infrastructure, bootindex not
      moved and vars removed to allow clean build, re-added later.

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 <arei.gonglei@huawei.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
 hw/misc/vfio.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/hw/misc/vfio.c b/hw/misc/vfio.c
index 64d4dc7..0af8613 100644
--- a/hw/misc/vfio.c
+++ b/hw/misc/vfio.c
@@ -4060,6 +4060,10 @@ post_reset:
     vfio_pci_post_reset(vdev);
 }
 
+static void vfio_instance_init(Object *obj)
+{
+}
+
 static Property vfio_pci_dev_properties[] = {
     DEFINE_PROP_PCI_HOST_DEVADDR("host", VFIOPCIDevice, host),
     DEFINE_PROP_STRING("sysfsdev", VFIOPCIDevice, vbasedev.sysfsdev),
@@ -4105,6 +4109,7 @@ static const TypeInfo vfio_pci_dev_info = {
     .parent = TYPE_PCI_DEVICE,
     .instance_size = sizeof(VFIOPCIDevice),
     .class_init = vfio_pci_dev_class_init,
+    .instance_init = vfio_instance_init,
 };
 
 static void register_vfio_pci_dev_type(void)
-- 
1.8.3.1