From nobody Fri Nov 7 11:34:27 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1493844037297795.5500660904534; Wed, 3 May 2017 13:40:37 -0700 (PDT) Received: from localhost ([::1]:38584 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d614d-0005cN-Jx for importer@patchew.org; Wed, 03 May 2017 16:40:35 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54442) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d610v-0002Tm-1o for qemu-devel@nongnu.org; Wed, 03 May 2017 16:36:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d610s-0001zt-Do for qemu-devel@nongnu.org; Wed, 03 May 2017 16:36:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53126) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d610g-0001p8-C1; Wed, 03 May 2017 16:36:30 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 96A1680F8D; Wed, 3 May 2017 20:36:28 +0000 (UTC) Received: from localhost (ovpn-116-28.gru2.redhat.com [10.97.116.28]) by smtp.corp.redhat.com (Postfix) with ESMTP id 95B5C74AA6; Wed, 3 May 2017 20:36:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 96A1680F8D Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=ehabkost@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 96A1680F8D From: Eduardo Habkost To: qemu-devel@nongnu.org Date: Wed, 3 May 2017 17:35:45 -0300 Message-Id: <20170503203604.31462-3-ehabkost@redhat.com> In-Reply-To: <20170503203604.31462-1-ehabkost@redhat.com> References: <20170503203604.31462-1-ehabkost@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 03 May 2017 20:36:29 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH RESEND v2 02/21] sysbus: Set user_creatable=false by default on TYPE_SYS_BUS_DEVICE X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Yi Min Zhao , "Michael S. Tsirkin" , Jason Wang , Pierre Morel , Markus Armbruster , Gerd Hoffmann , "Edgar E. Iglesias" , Rob Herring , sstabellini@kernel.org, qemu-block@nongnu.org, Alexander Graf , Christian Borntraeger , Shannon Zhao , Marcel Apfelbaum , Richard Henderson , Laszlo Ersek , Kevin Wolf , Thomas Huth , "Gabriel L . Somlo" , Alistair Francis , Beniamino Galvani , Alex Williamson , qemu-arm@nongnu.org, Paolo Bonzini , Cornelia Huck , John Snow , David Gibson , Juergen Gross , Frank Blaschka , Prasad J Pandit , Max Reitz , qemu-ppc@nongnu.org, Igor Mammedov Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" commit 33cd52b5d7b9adfd009e95f07e6c64dd88ae2a31 unset cannot_instantiate_with_device_add_yet in TYPE_SYSBUS, making all sysbus devices appear on "-device help" and lack the "no-user" flag in "info qdm". To fix this, we can set user_creatable=3Dfalse by default on TYPE_SYS_BUS_DEVICE, but this requires setting user_creatable=3Dtrue explicitly on the sysbus devices that actually work with -device. Fortunately today we have just a few has_dynamic_sysbus=3D1 machines: virt, pc-q35-*, ppce500, and spapr. virt, ppce500, and spapr have extra checks to ensure just a few device types can be instantiated: * virt supports only TYPE_VFIO_CALXEDA_XGMAC, TYPE_VFIO_AMD_XGBE. * ppce500 supports only TYPE_ETSEC_COMMON. * spapr supports only TYPE_SPAPR_PCI_HOST_BRIDGE. This patch sets user_creatable=3Dtrue explicitly on those 4 device classes. Now, the more complex cases: pc-q35-*: q35 has no sysbus device whitelist yet (which is a separate bug). We are in the process of fixing it and building a sysbus whitelist on q35, but in the meantime we can fix the "-device help" and "info qdm" bugs mentioned above. Also, despite not being strictly necessary for fixing the q35 bug, reducing the list of user_creatable=3Dtrue devices will help us be more confident when building the q35 whitelist. xen: We also have a hack at xen_set_dynamic_sysbus(), that sets has_dynamic_sysbus=3Dtrue at runtime when using the Xen accelerator. This hack is only used to allow xen-backend devices to be dynamically plugged/unplugged. This means today we can use -device with the following 22 device types, that are the ones compiled into the qemu-system-x86_64 and qemu-system-i386 binaries: * allwinner-ahci * amd-iommu * cfi.pflash01 * esp * fw_cfg_io * fw_cfg_mem * generic-sdhci * hpet * intel-iommu * ioapic * isabus-bridge * kvmclock * kvm-ioapic * kvmvapic * SUNW,fdtwo * sysbus-ahci * sysbus-fdc * sysbus-ohci * unimplemented-device * virtio-mmio * xen-backend * xen-sysdev This patch adds user_creatable=3Dtrue explicitly to those devices, temporarily, just to keep 100% compatibility with existing behavior of q35. Subsequent patches will remove user_creatable=3Dtrue from the devices that are really not meant to user-creatable on any machine, and remove the FIXME comment from the ones that are really supposed to be user-creatable. This is being done in separate patches because we still don't have an obvious list of devices that will be whitelisted by q35, and I would like to get each device reviewed individually. Cc: Alexander Graf Cc: Alex Williamson Cc: Alistair Francis Cc: Beniamino Galvani Cc: Christian Borntraeger Cc: Cornelia Huck Cc: David Gibson Cc: "Edgar E. Iglesias" Cc: Eduardo Habkost Cc: Frank Blaschka Cc: Gabriel L. Somlo Cc: Gerd Hoffmann Cc: Igor Mammedov Cc: Jason Wang Cc: John Snow Cc: Juergen Gross Cc: Kevin Wolf Cc: Laszlo Ersek Cc: Marcel Apfelbaum Cc: Markus Armbruster Cc: Max Reitz Cc: "Michael S. Tsirkin" Cc: Paolo Bonzini Cc: Peter Maydell Cc: Pierre Morel Cc: Prasad J Pandit Cc: qemu-arm@nongnu.org Cc: qemu-block@nongnu.org Cc: qemu-ppc@nongnu.org Cc: Richard Henderson Cc: Rob Herring Cc: Shannon Zhao Cc: sstabellini@kernel.org Cc: Thomas Huth Cc: Yi Min Zhao Acked-by: John Snow Acked-by: Juergen Gross Acked-by: Marcel Apfelbaum Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: * Rewrite commit message: don't pretend we are actually fixing the q35 issue. We're just fixing "info qdm" and "-device help". Making it easier to fix q35 is just a nice side-effect. * Rewrite FIXME comments to make it clear that we just have user_creatable=3Dtrue because we don't know yet if the device should be in the q35 whitelist --- hw/block/fdc.c | 10 ++++++++++ hw/block/pflash_cfi01.c | 5 +++++ hw/core/sysbus.c | 11 +++++++++++ hw/i386/amd_iommu.c | 5 +++++ hw/i386/intel_iommu.c | 5 +++++ hw/i386/kvm/clock.c | 5 +++++ hw/i386/kvm/ioapic.c | 5 +++++ hw/i386/kvmvapic.c | 5 +++++ hw/ide/ahci.c | 10 ++++++++++ hw/intc/ioapic.c | 5 +++++ hw/isa/isa-bus.c | 5 +++++ hw/misc/unimp.c | 5 +++++ hw/net/fsl_etsec/etsec.c | 2 ++ hw/nvram/fw_cfg.c | 10 ++++++++++ hw/ppc/spapr_pci.c | 2 ++ hw/scsi/esp.c | 5 +++++ hw/sd/sdhci.c | 5 +++++ hw/timer/hpet.c | 5 +++++ hw/usb/hcd-ohci.c | 5 +++++ hw/vfio/amd-xgbe.c | 2 ++ hw/vfio/calxeda-xgmac.c | 2 ++ hw/virtio/virtio-mmio.c | 5 +++++ hw/xen/xen_backend.c | 10 ++++++++++ 23 files changed, 129 insertions(+) diff --git a/hw/block/fdc.c b/hw/block/fdc.c index 2e629b398b..5c28a0b0ad 100644 --- a/hw/block/fdc.c +++ b/hw/block/fdc.c @@ -2880,6 +2880,11 @@ static void sysbus_fdc_class_init(ObjectClass *klass= , void *data) =20 dc->props =3D sysbus_fdc_properties; set_bit(DEVICE_CATEGORY_STORAGE, dc->categories); + /* + * FIXME: Set only because we are not sure yet if this device + * will be outside the q35 sysbus whitelist. + */ + dc->user_creatable =3D true; } =20 static const TypeInfo sysbus_fdc_info =3D { @@ -2906,6 +2911,11 @@ static void sun4m_fdc_class_init(ObjectClass *klass,= void *data) =20 dc->props =3D sun4m_fdc_properties; set_bit(DEVICE_CATEGORY_STORAGE, dc->categories); + /* + * FIXME: Set only because we are not sure yet if this device + * will be outside the q35 sysbus whitelist. + */ + dc->user_creatable =3D true; } =20 static const TypeInfo sun4m_fdc_info =3D { diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c index 594d4cf6fe..ef71956433 100644 --- a/hw/block/pflash_cfi01.c +++ b/hw/block/pflash_cfi01.c @@ -927,6 +927,11 @@ static void pflash_cfi01_class_init(ObjectClass *klass= , void *data) dc->props =3D pflash_cfi01_properties; dc->vmsd =3D &vmstate_pflash; set_bit(DEVICE_CATEGORY_STORAGE, dc->categories); + /* + * FIXME: Set only because we are not sure yet if this device + * will be outside the q35 sysbus whitelist. + */ + dc->user_creatable =3D true; } =20 =20 diff --git a/hw/core/sysbus.c b/hw/core/sysbus.c index c0f560b289..6a2eec8dd0 100644 --- a/hw/core/sysbus.c +++ b/hw/core/sysbus.c @@ -326,6 +326,17 @@ static void sysbus_device_class_init(ObjectClass *klas= s, void *data) DeviceClass *k =3D DEVICE_CLASS(klass); k->init =3D sysbus_device_init; k->bus_type =3D TYPE_SYSTEM_BUS; + /* + * device_add plugs devices into suitable bus. For "real" buses, + * that actually connects the device. For sysbus, the connections + * need to be made separately, and device_add can't do that. The + * device would be left unconnected, and will probably not work + * + * However, a few machines and a few devices can handle a few sysbus + * devices. In this case, the device subclass needs to override + * it and set user_creatable=3Dtrue. + */ + k->user_creatable =3D false; } =20 static const TypeInfo sysbus_device_type_info =3D { diff --git a/hw/i386/amd_iommu.c b/hw/i386/amd_iommu.c index f86a40aa30..7b92c8c15a 100644 --- a/hw/i386/amd_iommu.c +++ b/hw/i386/amd_iommu.c @@ -1186,6 +1186,11 @@ static void amdvi_class_init(ObjectClass *klass, voi= d* data) dc->vmsd =3D &vmstate_amdvi; dc->hotpluggable =3D false; dc_class->realize =3D amdvi_realize; + /* + * FIXME: Set only because we are not sure yet if this device + * will be outside the q35 sysbus whitelist. + */ + dc->user_creatable =3D true; } =20 static const TypeInfo amdvi =3D { diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index 02f047c8e3..54187a04a4 100644 --- a/hw/i386/intel_iommu.c +++ b/hw/i386/intel_iommu.c @@ -3009,6 +3009,11 @@ static void vtd_class_init(ObjectClass *klass, void = *data) dc->hotpluggable =3D false; x86_class->realize =3D vtd_realize; x86_class->int_remap =3D vtd_int_remap; + /* + * FIXME: Set only because we are not sure yet if this device + * will be outside the q35 sysbus whitelist. + */ + dc->user_creatable =3D true; } =20 static const TypeInfo vtd_info =3D { diff --git a/hw/i386/kvm/clock.c b/hw/i386/kvm/clock.c index 13eca374cd..7665bef999 100644 --- a/hw/i386/kvm/clock.c +++ b/hw/i386/kvm/clock.c @@ -286,6 +286,11 @@ static void kvmclock_class_init(ObjectClass *klass, vo= id *data) dc->realize =3D kvmclock_realize; dc->vmsd =3D &kvmclock_vmsd; dc->props =3D kvmclock_properties; + /* + * FIXME: Set only because we are not sure yet if this device + * will be outside the q35 sysbus whitelist. + */ + dc->user_creatable =3D true; } =20 static const TypeInfo kvmclock_info =3D { diff --git a/hw/i386/kvm/ioapic.c b/hw/i386/kvm/ioapic.c index 98ca480792..348c405180 100644 --- a/hw/i386/kvm/ioapic.c +++ b/hw/i386/kvm/ioapic.c @@ -167,6 +167,11 @@ static void kvm_ioapic_class_init(ObjectClass *klass, = void *data) k->post_load =3D kvm_ioapic_put; dc->reset =3D kvm_ioapic_reset; dc->props =3D kvm_ioapic_properties; + /* + * FIXME: Set only because we are not sure yet if this device + * will be outside the q35 sysbus whitelist. + */ + dc->user_creatable =3D true; } =20 static const TypeInfo kvm_ioapic_info =3D { diff --git a/hw/i386/kvmvapic.c b/hw/i386/kvmvapic.c index 82a49556af..45f6267c93 100644 --- a/hw/i386/kvmvapic.c +++ b/hw/i386/kvmvapic.c @@ -856,6 +856,11 @@ static void vapic_class_init(ObjectClass *klass, void = *data) dc->reset =3D vapic_reset; dc->vmsd =3D &vmstate_vapic; dc->realize =3D vapic_realize; + /* + * FIXME: Set only because we are not sure yet if this device + * will be outside the q35 sysbus whitelist. + */ + dc->user_creatable =3D true; } =20 static const TypeInfo vapic_type =3D { diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index f60826d6e0..7f10cda354 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -1721,6 +1721,11 @@ static void sysbus_ahci_class_init(ObjectClass *klas= s, void *data) dc->props =3D sysbus_ahci_properties; dc->reset =3D sysbus_ahci_reset; set_bit(DEVICE_CATEGORY_STORAGE, dc->categories); + /* + * FIXME: Set only because we are not sure yet if this device + * will be outside the q35 sysbus whitelist. + */ + dc->user_creatable =3D true; } =20 static const TypeInfo sysbus_ahci_info =3D { @@ -1815,6 +1820,11 @@ static void allwinner_ahci_class_init(ObjectClass *k= lass, void *data) DeviceClass *dc =3D DEVICE_CLASS(klass); =20 dc->vmsd =3D &vmstate_allwinner_ahci; + /* + * FIXME: Set only because we are not sure yet if this device + * will be outside the q35 sysbus whitelist. + */ + dc->user_creatable =3D true; } =20 static const TypeInfo allwinner_ahci_info =3D { diff --git a/hw/intc/ioapic.c b/hw/intc/ioapic.c index 37c4386ae3..f9e4f77def 100644 --- a/hw/intc/ioapic.c +++ b/hw/intc/ioapic.c @@ -448,6 +448,11 @@ static void ioapic_class_init(ObjectClass *klass, void= *data) k->post_load =3D ioapic_update_kvm_routes; dc->reset =3D ioapic_reset_common; dc->props =3D ioapic_properties; + /* + * FIXME: Set only because we are not sure yet if this device + * will be outside the q35 sysbus whitelist. + */ + dc->user_creatable =3D true; } =20 static const TypeInfo ioapic_info =3D { diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c index 348e0eab9d..ad4ac3b4f6 100644 --- a/hw/isa/isa-bus.c +++ b/hw/isa/isa-bus.c @@ -221,6 +221,11 @@ static void isabus_bridge_class_init(ObjectClass *klas= s, void *data) =20 set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories); dc->fw_name =3D "isa"; + /* + * FIXME: Set only because we are not sure yet if this device + * will be outside the q35 sysbus whitelist. + */ + dc->user_creatable =3D true; } =20 static const TypeInfo isabus_bridge_info =3D { diff --git a/hw/misc/unimp.c b/hw/misc/unimp.c index bcbb585888..e446c1d652 100644 --- a/hw/misc/unimp.c +++ b/hw/misc/unimp.c @@ -90,6 +90,11 @@ static void unimp_class_init(ObjectClass *klass, void *d= ata) =20 dc->realize =3D unimp_realize; dc->props =3D unimp_properties; + /* + * FIXME: Set only because we are not sure yet if this device + * will be outside the q35 sysbus whitelist. + */ + dc->user_creatable =3D true; } =20 static const TypeInfo unimp_info =3D { diff --git a/hw/net/fsl_etsec/etsec.c b/hw/net/fsl_etsec/etsec.c index aa2b0d5a85..9da1932970 100644 --- a/hw/net/fsl_etsec/etsec.c +++ b/hw/net/fsl_etsec/etsec.c @@ -416,6 +416,8 @@ static void etsec_class_init(ObjectClass *klass, void *= data) dc->realize =3D etsec_realize; dc->reset =3D etsec_reset; dc->props =3D etsec_properties; + /* Supported by ppce500 machine */ + dc->user_creatable =3D true; } =20 static TypeInfo etsec_info =3D { diff --git a/hw/nvram/fw_cfg.c b/hw/nvram/fw_cfg.c index 316fca9bc1..7993aea792 100644 --- a/hw/nvram/fw_cfg.c +++ b/hw/nvram/fw_cfg.c @@ -1101,6 +1101,11 @@ static void fw_cfg_io_class_init(ObjectClass *klass,= void *data) =20 dc->realize =3D fw_cfg_io_realize; dc->props =3D fw_cfg_io_properties; + /* + * FIXME: Set only because we are not sure yet if this device + * will be outside the q35 sysbus whitelist. + */ + dc->user_creatable =3D true; } =20 static const TypeInfo fw_cfg_io_info =3D { @@ -1167,6 +1172,11 @@ static void fw_cfg_mem_class_init(ObjectClass *klass= , void *data) =20 dc->realize =3D fw_cfg_mem_realize; dc->props =3D fw_cfg_mem_properties; + /* + * FIXME: Set only because we are not sure yet if this device + * will be outside the q35 sysbus whitelist. + */ + dc->user_creatable =3D true; } =20 static const TypeInfo fw_cfg_mem_info =3D { diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c index e7567e2e8f..a7cff32bbf 100644 --- a/hw/ppc/spapr_pci.c +++ b/hw/ppc/spapr_pci.c @@ -1994,6 +1994,8 @@ static void spapr_phb_class_init(ObjectClass *klass, = void *data) dc->props =3D spapr_phb_properties; dc->reset =3D spapr_phb_reset; dc->vmsd =3D &vmstate_spapr_pci; + /* Supported by TYPE_SPAPR_MACHINE */ + dc->user_creatable =3D true; set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories); hp->plug =3D spapr_phb_hot_plug_child; hp->unplug =3D spapr_phb_hot_unplug_child; diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c index eee831efeb..7bdc1e1b99 100644 --- a/hw/scsi/esp.c +++ b/hw/scsi/esp.c @@ -728,6 +728,11 @@ static void sysbus_esp_class_init(ObjectClass *klass, = void *data) dc->reset =3D sysbus_esp_hard_reset; dc->vmsd =3D &vmstate_sysbus_esp_scsi; set_bit(DEVICE_CATEGORY_STORAGE, dc->categories); + /* + * FIXME: Set only because we are not sure yet if this device + * will be outside the q35 sysbus whitelist. + */ + dc->user_creatable =3D true; } =20 static const TypeInfo sysbus_esp_info =3D { diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c index 6d6a791ee9..dbf61fccb8 100644 --- a/hw/sd/sdhci.c +++ b/hw/sd/sdhci.c @@ -1360,6 +1360,11 @@ static void sdhci_sysbus_class_init(ObjectClass *kla= ss, void *data) dc->props =3D sdhci_sysbus_properties; dc->realize =3D sdhci_sysbus_realize; dc->reset =3D sdhci_poweron_reset; + /* + * FIXME: Set only because we are not sure yet if this device + * will be outside the q35 sysbus whitelist. + */ + dc->user_creatable =3D true; } =20 static const TypeInfo sdhci_sysbus_info =3D { diff --git a/hw/timer/hpet.c b/hw/timer/hpet.c index a2c18b30c3..4dcbd5bb3d 100644 --- a/hw/timer/hpet.c +++ b/hw/timer/hpet.c @@ -771,6 +771,11 @@ static void hpet_device_class_init(ObjectClass *klass,= void *data) dc->reset =3D hpet_reset; dc->vmsd =3D &vmstate_hpet; dc->props =3D hpet_device_properties; + /* + * FIXME: Set only because we are not sure yet if this device + * will be outside the q35 sysbus whitelist. + */ + dc->user_creatable =3D true; } =20 static const TypeInfo hpet_device_info =3D { diff --git a/hw/usb/hcd-ohci.c b/hw/usb/hcd-ohci.c index 3ada35e954..18b31022a7 100644 --- a/hw/usb/hcd-ohci.c +++ b/hw/usb/hcd-ohci.c @@ -2159,6 +2159,11 @@ static void ohci_sysbus_class_init(ObjectClass *klas= s, void *data) dc->desc =3D "OHCI USB Controller"; dc->props =3D ohci_sysbus_properties; dc->reset =3D usb_ohci_reset_sysbus; + /* + * FIXME: Set only because we are not sure yet if this device + * will be outside the q35 sysbus whitelist. + */ + dc->user_creatable =3D true; } =20 static const TypeInfo ohci_sysbus_info =3D { diff --git a/hw/vfio/amd-xgbe.c b/hw/vfio/amd-xgbe.c index 2c60310cf9..fab196cebf 100644 --- a/hw/vfio/amd-xgbe.c +++ b/hw/vfio/amd-xgbe.c @@ -38,6 +38,8 @@ static void vfio_amd_xgbe_class_init(ObjectClass *klass, = void *data) dc->realize =3D amd_xgbe_realize; dc->desc =3D "VFIO AMD XGBE"; dc->vmsd =3D &vfio_platform_amd_xgbe_vmstate; + /* Supported by TYPE_VIRT_MACHINE */ + dc->user_creatable =3D true; } =20 static const TypeInfo vfio_amd_xgbe_dev_info =3D { diff --git a/hw/vfio/calxeda-xgmac.c b/hw/vfio/calxeda-xgmac.c index bb15d588e5..7bb17af7ad 100644 --- a/hw/vfio/calxeda-xgmac.c +++ b/hw/vfio/calxeda-xgmac.c @@ -38,6 +38,8 @@ static void vfio_calxeda_xgmac_class_init(ObjectClass *kl= ass, void *data) dc->realize =3D calxeda_xgmac_realize; dc->desc =3D "VFIO Calxeda XGMAC"; dc->vmsd =3D &vfio_platform_calxeda_xgmac_vmstate; + /* Supported by TYPE_VIRT_MACHINE */ + dc->user_creatable =3D true; } =20 static const TypeInfo vfio_calxeda_xgmac_dev_info =3D { diff --git a/hw/virtio/virtio-mmio.c b/hw/virtio/virtio-mmio.c index 5807aa87fe..6491a771ff 100644 --- a/hw/virtio/virtio-mmio.c +++ b/hw/virtio/virtio-mmio.c @@ -450,6 +450,11 @@ static void virtio_mmio_class_init(ObjectClass *klass,= void *data) dc->reset =3D virtio_mmio_reset; set_bit(DEVICE_CATEGORY_MISC, dc->categories); dc->props =3D virtio_mmio_properties; + /* + * FIXME: Set only because we are not sure yet if this device + * will be outside the q35 sysbus whitelist. + */ + dc->user_creatable =3D true; } =20 static const TypeInfo virtio_mmio_info =3D { diff --git a/hw/xen/xen_backend.c b/hw/xen/xen_backend.c index c85f1637e4..67cb4cb9f0 100644 --- a/hw/xen/xen_backend.c +++ b/hw/xen/xen_backend.c @@ -619,6 +619,11 @@ static void xendev_class_init(ObjectClass *klass, void= *data) =20 dc->props =3D xendev_properties; set_bit(DEVICE_CATEGORY_MISC, dc->categories); + /* + * FIXME: Set only because we are not sure yet if this device + * will be outside the q35 sysbus whitelist. + */ + dc->user_creatable =3D true; } =20 static const TypeInfo xendev_type_info =3D { @@ -662,6 +667,11 @@ static void xen_sysdev_class_init(ObjectClass *klass, = void *data) k->init =3D xen_sysdev_init; dc->props =3D xen_sysdev_properties; dc->bus_type =3D TYPE_XENSYSBUS; + /* + * FIXME: Set only because we are not sure yet if this device + * will be outside the q35 sysbus whitelist. + */ + dc->user_creatable =3D true; } =20 static const TypeInfo xensysdev_info =3D { --=20 2.11.0.259.g40922b1