Blame SOURCES/kvm-qdev-Replace-no_user-by-cannot_instantiate_with_devi.patch

218e99
From 3e04367b75615f4b1b53350b875c5c14b68dc785 Mon Sep 17 00:00:00 2001
218e99
From: Kevin Wolf <kwolf@redhat.com>
218e99
Date: Wed, 6 Nov 2013 14:41:12 +0100
218e99
Subject: [PATCH 36/81] qdev: Replace no_user by cannot_instantiate_with_device_add_yet
218e99
218e99
RH-Author: Kevin Wolf <kwolf@redhat.com>
218e99
Message-id: <1383748882-22831-8-git-send-email-kwolf@redhat.com>
218e99
Patchwork-id: 55533
218e99
O-Subject: [RHEL-7.0 qemu-kvm PATCH v2 07/17] qdev: Replace no_user by cannot_instantiate_with_device_add_yet
218e99
Bugzilla: 1001216
218e99
RH-Acked-by: Marcel Apfelbaum <marcel.a@redhat.com>
218e99
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
218e99
RH-Acked-by: Kevin Wolf <kwolf@redhat.com>
218e99
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
218e99
218e99
From: Markus Armbruster <armbru@redhat.com>
218e99
218e99
In an ideal world, machines can be built by wiring devices together
218e99
with configuration, not code.  Unfortunately, that's not the world we
218e99
live in right now.  We still have quite a few devices that need to be
218e99
wired up by code.  If you try to device_add such a device, it'll fail
218e99
in sometimes mysterious ways.  If you're lucky, you get an
218e99
unmysterious immediate crash.
218e99
218e99
To protect users from such badness, DeviceClass member no_user used to
218e99
make device models unavailable with -device / device_add, but that
218e99
regressed in commit 18b6dad.  The device model is still omitted from
218e99
help, but is available anyway.
218e99
218e99
Attempts to fix the regression have been rejected with the argument
218e99
that the purpose of no_user isn't clear, and it's prone to misuse.
218e99
218e99
This commit clarifies no_user's purpose.  Anthony suggested to rename
218e99
it cannot_instantiate_with_device_add_yet_due_to_internal_bugs, which
218e99
I shorten somewhat to keep checkpatch happy.  While there, make it
218e99
bool.
218e99
218e99
Every use of cannot_instantiate_with_device_add_yet gets a FIXME
218e99
comment asking for rationale.  The next few commits will clean them
218e99
all up, either by providing a rationale, or by getting rid of the use.
218e99
218e99
With that done, the regression fix is hopefully acceptable.
218e99
218e99
Signed-off-by: Markus Armbruster <armbru@redhat.com>
218e99
Reviewed-by: Marcel Apfelbaum <marcel.a@redhat.com>
218e99
(cherry picked from pending upstream submission)
218e99
218e99
Conflicts:
218e99
	hw/dma/pl080.c
218e99
	hw/i386/kvm/clock.c
218e99
	hw/i386/pc.c
218e99
	hw/input/pckbd.c
218e99
	hw/input/vmmouse.c
218e99
	hw/misc/vmport.c
218e99
	hw/nvram/fw_cfg.c
218e99
	hw/pci-host/piix.c
218e99
	hw/timer/hpet.c
218e99
	hw/timer/m48t59.c
218e99
	hw/timer/mc146818rtc.c
218e99
218e99
A few more semantic conflicts elsewhere.  Conflict resolution is
218e99
always the same: replace just no_user, keep context intact.
218e99
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
218e99
---
218e99
 hw/acpi/piix4.c            |  2 +-
218e99
 hw/alpha/typhoon.c         |  2 +-
218e99
 hw/arm/versatilepb.c       |  2 +-
218e99
 hw/audio/pcspk.c           |  2 +-
218e99
 hw/audio/pl041.c           |  2 +-
218e99
 hw/block/fdc.c             |  2 +-
218e99
 hw/display/pl110.c         |  6 +++---
218e99
 hw/dma/pl080.c             |  4 ++--
218e99
 hw/i2c/smbus_ich9.c        |  2 +-
218e99
 hw/i386/kvm/clock.c        |  2 +-
218e99
 hw/i386/kvmvapic.c         |  2 +-
218e99
 hw/i386/pc.c               |  2 +-
218e99
 hw/ide/piix.c              |  6 +++---
218e99
 hw/ide/via.c               |  2 +-
218e99
 hw/input/pckbd.c           |  2 +-
218e99
 hw/input/vmmouse.c         |  2 +-
218e99
 hw/intc/apic_common.c      |  2 +-
218e99
 hw/intc/arm_gic.c          |  2 +-
218e99
 hw/intc/arm_gic_common.c   |  2 +-
218e99
 hw/intc/arm_gic_kvm.c      |  2 +-
218e99
 hw/intc/i8259_common.c     |  2 +-
218e99
 hw/intc/ioapic_common.c    |  2 +-
218e99
 hw/intc/pl190.c            |  2 +-
218e99
 hw/isa/isa-bus.c           |  2 +-
218e99
 hw/isa/lpc_ich9.c          |  2 +-
218e99
 hw/isa/piix4.c             |  2 +-
218e99
 hw/isa/vt82c686.c          |  2 +-
218e99
 hw/misc/arm_l2x0.c         |  2 +-
218e99
 hw/misc/pvpanic.c          |  2 +-
218e99
 hw/misc/vmport.c           |  2 +-
218e99
 hw/nvram/fw_cfg.c          |  2 +-
218e99
 hw/pci-host/bonito.c       |  4 ++--
218e99
 hw/pci-host/grackle.c      |  4 ++--
218e99
 hw/pci-host/piix.c         |  8 ++++----
218e99
 hw/pci-host/prep.c         |  4 ++--
218e99
 hw/ppc/spapr_vio.c         |  2 +-
218e99
 hw/s390x/ipl.c             |  2 +-
218e99
 hw/s390x/s390-virtio-bus.c |  2 +-
218e99
 hw/s390x/virtio-ccw.c      |  2 +-
218e99
 hw/sd/pl181.c              |  2 +-
218e99
 hw/timer/arm_mptimer.c     |  2 +-
218e99
 hw/timer/hpet.c            |  2 +-
218e99
 hw/timer/i8254_common.c    |  2 +-
218e99
 hw/timer/m48t59.c          |  2 +-
218e99
 hw/timer/mc146818rtc.c     |  2 +-
218e99
 hw/timer/pl031.c           |  2 +-
218e99
 include/hw/qdev-core.h     | 13 ++++++++++++-
218e99
 qdev-monitor.c             |  5 +++--
218e99
 qom/cpu.c                  |  2 +-
218e99
 49 files changed, 73 insertions(+), 61 deletions(-)
218e99
218e99
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
218e99
---
218e99
 hw/acpi/piix4.c            |    2 +-
218e99
 hw/alpha/typhoon.c         |    2 +-
218e99
 hw/arm/versatilepb.c       |    2 +-
218e99
 hw/audio/pcspk.c           |    2 +-
218e99
 hw/audio/pl041.c           |    2 +-
218e99
 hw/block/fdc.c             |    2 +-
218e99
 hw/display/pl110.c         |    6 +++---
218e99
 hw/dma/pl080.c             |    4 ++--
218e99
 hw/i2c/smbus_ich9.c        |    2 +-
218e99
 hw/i386/kvm/clock.c        |    2 +-
218e99
 hw/i386/kvmvapic.c         |    2 +-
218e99
 hw/i386/pc.c               |    2 +-
218e99
 hw/ide/piix.c              |    6 +++---
218e99
 hw/ide/via.c               |    2 +-
218e99
 hw/input/pckbd.c           |    2 +-
218e99
 hw/input/vmmouse.c         |    2 +-
218e99
 hw/intc/apic_common.c      |    2 +-
218e99
 hw/intc/arm_gic.c          |    2 +-
218e99
 hw/intc/arm_gic_common.c   |    2 +-
218e99
 hw/intc/arm_gic_kvm.c      |    2 +-
218e99
 hw/intc/i8259_common.c     |    2 +-
218e99
 hw/intc/ioapic_common.c    |    2 +-
218e99
 hw/intc/pl190.c            |    2 +-
218e99
 hw/isa/isa-bus.c           |    2 +-
218e99
 hw/isa/lpc_ich9.c          |    2 +-
218e99
 hw/isa/piix4.c             |    2 +-
218e99
 hw/isa/vt82c686.c          |    2 +-
218e99
 hw/misc/arm_l2x0.c         |    2 +-
218e99
 hw/misc/pvpanic.c          |    2 +-
218e99
 hw/misc/vmport.c           |    2 +-
218e99
 hw/nvram/fw_cfg.c          |    2 +-
218e99
 hw/pci-host/bonito.c       |    4 ++--
218e99
 hw/pci-host/grackle.c      |    4 ++--
218e99
 hw/pci-host/piix.c         |    8 ++++----
218e99
 hw/pci-host/prep.c         |    4 ++--
218e99
 hw/ppc/spapr_vio.c         |    2 +-
218e99
 hw/s390x/ipl.c             |    2 +-
218e99
 hw/s390x/s390-virtio-bus.c |    2 +-
218e99
 hw/s390x/virtio-ccw.c      |    2 +-
218e99
 hw/sd/pl181.c              |    2 +-
218e99
 hw/timer/arm_mptimer.c     |    2 +-
218e99
 hw/timer/hpet.c            |    2 +-
218e99
 hw/timer/i8254_common.c    |    2 +-
218e99
 hw/timer/m48t59.c          |    2 +-
218e99
 hw/timer/mc146818rtc.c     |    2 +-
218e99
 hw/timer/pl031.c           |    2 +-
218e99
 include/hw/qdev-core.h     |   13 ++++++++++++-
218e99
 qdev-monitor.c             |    5 +++--
218e99
 qom/cpu.c                  |    2 +-
218e99
 49 files changed, 73 insertions(+), 61 deletions(-)
218e99
218e99
diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c
218e99
index f14867a..46685b7 100644
218e99
--- a/hw/acpi/piix4.c
218e99
+++ b/hw/acpi/piix4.c
218e99
@@ -494,7 +494,7 @@ static void piix4_pm_class_init(ObjectClass *klass, void *data)
218e99
     k->revision = 0x03;
218e99
     k->class_id = PCI_CLASS_BRIDGE_OTHER;
218e99
     dc->desc = "PM";
218e99
-    dc->no_user = 1;
218e99
+    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
     dc->vmsd = &vmstate_acpi;
218e99
     dc->props = piix4_pm_properties;
218e99
 }
218e99
diff --git a/hw/alpha/typhoon.c b/hw/alpha/typhoon.c
218e99
index 1ead187..55a0e76 100644
218e99
--- a/hw/alpha/typhoon.c
218e99
+++ b/hw/alpha/typhoon.c
218e99
@@ -823,7 +823,7 @@ static void typhoon_pcihost_class_init(ObjectClass *klass, void *data)
218e99
     SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
218e99
 
218e99
     k->init = typhoon_pcihost_init;
218e99
-    dc->no_user = 1;
218e99
+    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
 }
218e99
 
218e99
 static const TypeInfo typhoon_pcihost_info = {
218e99
diff --git a/hw/arm/versatilepb.c b/hw/arm/versatilepb.c
218e99
index 753757e..84cd1ed 100644
218e99
--- a/hw/arm/versatilepb.c
218e99
+++ b/hw/arm/versatilepb.c
218e99
@@ -387,7 +387,7 @@ static void vpb_sic_class_init(ObjectClass *klass, void *data)
218e99
     SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
218e99
 
218e99
     k->init = vpb_sic_init;
218e99
-    dc->no_user = 1;
218e99
+    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
     dc->vmsd = &vmstate_vpb_sic;
218e99
 }
218e99
 
218e99
diff --git a/hw/audio/pcspk.c b/hw/audio/pcspk.c
218e99
index 4e03bc9..9186304 100644
218e99
--- a/hw/audio/pcspk.c
218e99
+++ b/hw/audio/pcspk.c
218e99
@@ -188,7 +188,7 @@ static void pcspk_class_initfn(ObjectClass *klass, void *data)
218e99
 
218e99
     ic->init = pcspk_initfn;
218e99
     set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
218e99
-    dc->no_user = 1;
218e99
+    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
     dc->props = pcspk_properties;
218e99
 }
218e99
 
218e99
diff --git a/hw/audio/pl041.c b/hw/audio/pl041.c
218e99
index 9b11cc9..36a7ecb 100644
218e99
--- a/hw/audio/pl041.c
218e99
+++ b/hw/audio/pl041.c
218e99
@@ -627,7 +627,7 @@ static void pl041_device_class_init(ObjectClass *klass, void *data)
218e99
 
218e99
     k->init = pl041_init;
218e99
     set_bit(DEVICE_CATEGORY_SOUND, dc->categories);
218e99
-    dc->no_user = 1;
218e99
+    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
     dc->reset = pl041_device_reset;
218e99
     dc->vmsd = &vmstate_pl041;
218e99
     dc->props = pl041_device_properties;
218e99
diff --git a/hw/block/fdc.c b/hw/block/fdc.c
218e99
index e292f4c..1524e09 100644
218e99
--- a/hw/block/fdc.c
218e99
+++ b/hw/block/fdc.c
218e99
@@ -2206,7 +2206,7 @@ static void isabus_fdc_class_init(ObjectClass *klass, void *data)
218e99
     ISADeviceClass *ic = ISA_DEVICE_CLASS(klass);
218e99
     ic->init = isabus_fdc_init1;
218e99
     dc->fw_name = "fdc";
218e99
-    dc->no_user = 1;
218e99
+    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
     dc->reset = fdctrl_external_reset_isa;
218e99
     dc->vmsd = &vmstate_isa_fdc;
218e99
     dc->props = isa_fdc_properties;
218e99
diff --git a/hw/display/pl110.c b/hw/display/pl110.c
218e99
index b45a7be..173ddf8 100644
218e99
--- a/hw/display/pl110.c
218e99
+++ b/hw/display/pl110.c
218e99
@@ -482,7 +482,7 @@ static void pl110_class_init(ObjectClass *klass, void *data)
218e99
 
218e99
     k->init = pl110_init;
218e99
     set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
218e99
-    dc->no_user = 1;
218e99
+    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
     dc->vmsd = &vmstate_pl110;
218e99
 }
218e99
 
218e99
@@ -500,7 +500,7 @@ static void pl110_versatile_class_init(ObjectClass *klass, void *data)
218e99
 
218e99
     k->init = pl110_versatile_init;
218e99
     set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
218e99
-    dc->no_user = 1;
218e99
+    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
     dc->vmsd = &vmstate_pl110;
218e99
 }
218e99
 
218e99
@@ -518,7 +518,7 @@ static void pl111_class_init(ObjectClass *klass, void *data)
218e99
 
218e99
     k->init = pl111_init;
218e99
     set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
218e99
-    dc->no_user = 1;
218e99
+    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
     dc->vmsd = &vmstate_pl110;
218e99
 }
218e99
 
218e99
diff --git a/hw/dma/pl080.c b/hw/dma/pl080.c
218e99
index 00b66b4..2920780 100644
218e99
--- a/hw/dma/pl080.c
218e99
+++ b/hw/dma/pl080.c
218e99
@@ -382,7 +382,7 @@ static void pl080_class_init(ObjectClass *klass, void *data)
218e99
     SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
218e99
 
218e99
     k->init = pl080_init;
218e99
-    dc->no_user = 1;
218e99
+    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
     dc->vmsd = &vmstate_pl080;
218e99
 }
218e99
 
218e99
@@ -399,7 +399,7 @@ static void pl081_class_init(ObjectClass *klass, void *data)
218e99
     SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
218e99
 
218e99
     k->init = pl081_init;
218e99
-    dc->no_user = 1;
218e99
+    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
     dc->vmsd = &vmstate_pl080;
218e99
 }
218e99
 
218e99
diff --git a/hw/i2c/smbus_ich9.c b/hw/i2c/smbus_ich9.c
218e99
index ca22978..c1ffa34 100644
218e99
--- a/hw/i2c/smbus_ich9.c
218e99
+++ b/hw/i2c/smbus_ich9.c
218e99
@@ -97,7 +97,7 @@ static void ich9_smb_class_init(ObjectClass *klass, void *data)
218e99
     k->device_id = PCI_DEVICE_ID_INTEL_ICH9_6;
218e99
     k->revision = ICH9_A2_SMB_REVISION;
218e99
     k->class_id = PCI_CLASS_SERIAL_SMBUS;
218e99
-    dc->no_user = 1;
218e99
+    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
     dc->vmsd = &vmstate_ich9_smbus;
218e99
     dc->desc = "ICH9 SMBUS Bridge";
218e99
     k->init = ich9_smbus_initfn;
218e99
diff --git a/hw/i386/kvm/clock.c b/hw/i386/kvm/clock.c
218e99
index 98e5ca5..6204939 100644
218e99
--- a/hw/i386/kvm/clock.c
218e99
+++ b/hw/i386/kvm/clock.c
218e99
@@ -110,7 +110,7 @@ static void kvmclock_class_init(ObjectClass *klass, void *data)
218e99
     SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
218e99
 
218e99
     k->init = kvmclock_init;
218e99
-    dc->no_user = 1;
218e99
+    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
     dc->vmsd = &kvmclock_vmsd;
218e99
 }
218e99
 
218e99
diff --git a/hw/i386/kvmvapic.c b/hw/i386/kvmvapic.c
218e99
index 655483b..e6405da 100644
218e99
--- a/hw/i386/kvmvapic.c
218e99
+++ b/hw/i386/kvmvapic.c
218e99
@@ -809,7 +809,7 @@ static void vapic_class_init(ObjectClass *klass, void *data)
218e99
     SysBusDeviceClass *sc = SYS_BUS_DEVICE_CLASS(klass);
218e99
     DeviceClass *dc = DEVICE_CLASS(klass);
218e99
 
218e99
-    dc->no_user = 1;
218e99
+    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
     dc->reset   = vapic_reset;
218e99
     dc->vmsd    = &vmstate_vapic;
218e99
     sc->init    = vapic_init;
218e99
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
218e99
index d3acbbb..0a8840a 100644
218e99
--- a/hw/i386/pc.c
218e99
+++ b/hw/i386/pc.c
218e99
@@ -538,7 +538,7 @@ static void port92_class_initfn(ObjectClass *klass, void *data)
218e99
     DeviceClass *dc = DEVICE_CLASS(klass);
218e99
     ISADeviceClass *ic = ISA_DEVICE_CLASS(klass);
218e99
     ic->init = port92_initfn;
218e99
-    dc->no_user = 1;
218e99
+    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
     dc->reset = port92_reset;
218e99
     dc->vmsd = &vmstate_port92_isa;
218e99
 }
218e99
diff --git a/hw/ide/piix.c b/hw/ide/piix.c
218e99
index 8d4bf2f..e6864b1 100644
218e99
--- a/hw/ide/piix.c
218e99
+++ b/hw/ide/piix.c
218e99
@@ -249,7 +249,7 @@ static void piix3_ide_class_init(ObjectClass *klass, void *data)
218e99
     k->device_id = PCI_DEVICE_ID_INTEL_82371SB_1;
218e99
     k->class_id = PCI_CLASS_STORAGE_IDE;
218e99
     set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
218e99
-    dc->no_user = 1;
218e99
+    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
 }
218e99
 
218e99
 static const TypeInfo piix3_ide_info = {
218e99
@@ -269,7 +269,7 @@ static void piix3_ide_xen_class_init(ObjectClass *klass, void *data)
218e99
     k->device_id = PCI_DEVICE_ID_INTEL_82371SB_1;
218e99
     k->class_id = PCI_CLASS_STORAGE_IDE;
218e99
     set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
218e99
-    dc->no_user = 1;
218e99
+    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
     dc->unplug = pci_piix3_xen_ide_unplug;
218e99
 }
218e99
 
218e99
@@ -292,7 +292,7 @@ static void piix4_ide_class_init(ObjectClass *klass, void *data)
218e99
     k->device_id = PCI_DEVICE_ID_INTEL_82371AB;
218e99
     k->class_id = PCI_CLASS_STORAGE_IDE;
218e99
     set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
218e99
-    dc->no_user = 1;
218e99
+    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
 }
218e99
 
218e99
 static const TypeInfo piix4_ide_info = {
218e99
diff --git a/hw/ide/via.c b/hw/ide/via.c
218e99
index 30dedd8..6ba99c8 100644
218e99
--- a/hw/ide/via.c
218e99
+++ b/hw/ide/via.c
218e99
@@ -224,7 +224,7 @@ static void via_ide_class_init(ObjectClass *klass, void *data)
218e99
     k->revision = 0x06;
218e99
     k->class_id = PCI_CLASS_STORAGE_IDE;
218e99
     set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
218e99
-    dc->no_user = 1;
218e99
+    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
 }
218e99
 
218e99
 static const TypeInfo via_ide_info = {
218e99
diff --git a/hw/input/pckbd.c b/hw/input/pckbd.c
218e99
index 17a5614..98b8b15 100644
218e99
--- a/hw/input/pckbd.c
218e99
+++ b/hw/input/pckbd.c
218e99
@@ -514,7 +514,7 @@ static void i8042_class_initfn(ObjectClass *klass, void *data)
218e99
     DeviceClass *dc = DEVICE_CLASS(klass);
218e99
     ISADeviceClass *ic = ISA_DEVICE_CLASS(klass);
218e99
     ic->init = i8042_initfn;
218e99
-    dc->no_user = 1;
218e99
+    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
     dc->vmsd = &vmstate_kbd_isa;
218e99
 }
218e99
 
218e99
diff --git a/hw/input/vmmouse.c b/hw/input/vmmouse.c
218e99
index a610738..c9d5131 100644
218e99
--- a/hw/input/vmmouse.c
218e99
+++ b/hw/input/vmmouse.c
218e99
@@ -284,7 +284,7 @@ static void vmmouse_class_initfn(ObjectClass *klass, void *data)
218e99
     DeviceClass *dc = DEVICE_CLASS(klass);
218e99
     ISADeviceClass *ic = ISA_DEVICE_CLASS(klass);
218e99
     ic->init = vmmouse_initfn;
218e99
-    dc->no_user = 1;
218e99
+    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
     dc->reset = vmmouse_reset;
218e99
     dc->vmsd = &vmstate_vmmouse;
218e99
     dc->props = vmmouse_properties;
218e99
diff --git a/hw/intc/apic_common.c b/hw/intc/apic_common.c
218e99
index b03e904..208e7b1 100644
218e99
--- a/hw/intc/apic_common.c
218e99
+++ b/hw/intc/apic_common.c
218e99
@@ -386,7 +386,7 @@ static void apic_common_class_init(ObjectClass *klass, void *data)
218e99
 
218e99
     dc->vmsd = &vmstate_apic_common;
218e99
     dc->reset = apic_reset_common;
218e99
-    dc->no_user = 1;
218e99
+    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
     dc->props = apic_properties_common;
218e99
     idc->init = apic_init_common;
218e99
 }
218e99
diff --git a/hw/intc/arm_gic.c b/hw/intc/arm_gic.c
218e99
index bae6572..243cbf1 100644
218e99
--- a/hw/intc/arm_gic.c
218e99
+++ b/hw/intc/arm_gic.c
218e99
@@ -702,7 +702,7 @@ static void arm_gic_class_init(ObjectClass *klass, void *data)
218e99
     DeviceClass *dc = DEVICE_CLASS(klass);
218e99
     ARMGICClass *agc = ARM_GIC_CLASS(klass);
218e99
 
218e99
-    dc->no_user = 1;
218e99
+    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
     agc->parent_realize = dc->realize;
218e99
     dc->realize = arm_gic_realize;
218e99
 }
218e99
diff --git a/hw/intc/arm_gic_common.c b/hw/intc/arm_gic_common.c
218e99
index 08560f2..26b7756 100644
218e99
--- a/hw/intc/arm_gic_common.c
218e99
+++ b/hw/intc/arm_gic_common.c
218e99
@@ -156,7 +156,7 @@ static void arm_gic_common_class_init(ObjectClass *klass, void *data)
218e99
     dc->realize = arm_gic_common_realize;
218e99
     dc->props = arm_gic_common_properties;
218e99
     dc->vmsd = &vmstate_gic;
218e99
-    dc->no_user = 1;
218e99
+    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
 }
218e99
 
218e99
 static const TypeInfo arm_gic_common_type = {
218e99
diff --git a/hw/intc/arm_gic_kvm.c b/hw/intc/arm_gic_kvm.c
218e99
index b756456..cb4ce23 100644
218e99
--- a/hw/intc/arm_gic_kvm.c
218e99
+++ b/hw/intc/arm_gic_kvm.c
218e99
@@ -148,7 +148,7 @@ static void kvm_arm_gic_class_init(ObjectClass *klass, void *data)
218e99
     kgc->parent_reset = dc->reset;
218e99
     dc->realize = kvm_arm_gic_realize;
218e99
     dc->reset = kvm_arm_gic_reset;
218e99
-    dc->no_user = 1;
218e99
+    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
 }
218e99
 
218e99
 static const TypeInfo kvm_arm_gic_info = {
218e99
diff --git a/hw/intc/i8259_common.c b/hw/intc/i8259_common.c
218e99
index c2ba6a5..70868a5 100644
218e99
--- a/hw/intc/i8259_common.c
218e99
+++ b/hw/intc/i8259_common.c
218e99
@@ -139,7 +139,7 @@ static void pic_common_class_init(ObjectClass *klass, void *data)
218e99
     DeviceClass *dc = DEVICE_CLASS(klass);
218e99
 
218e99
     dc->vmsd = &vmstate_pic_common;
218e99
-    dc->no_user = 1;
218e99
+    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
     dc->props = pic_properties_common;
218e99
     ic->init = pic_init_common;
218e99
 }
218e99
diff --git a/hw/intc/ioapic_common.c b/hw/intc/ioapic_common.c
218e99
index 5c5bb3c..ce610b7 100644
218e99
--- a/hw/intc/ioapic_common.c
218e99
+++ b/hw/intc/ioapic_common.c
218e99
@@ -100,7 +100,7 @@ static void ioapic_common_class_init(ObjectClass *klass, void *data)
218e99
 
218e99
     sc->init = ioapic_init_common;
218e99
     dc->vmsd = &vmstate_ioapic_common;
218e99
-    dc->no_user = 1;
218e99
+    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
 }
218e99
 
218e99
 static const TypeInfo ioapic_common_type = {
218e99
diff --git a/hw/intc/pl190.c b/hw/intc/pl190.c
218e99
index 9610673..ff0e5b0 100644
218e99
--- a/hw/intc/pl190.c
218e99
+++ b/hw/intc/pl190.c
218e99
@@ -269,7 +269,7 @@ static void pl190_class_init(ObjectClass *klass, void *data)
218e99
     SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
218e99
 
218e99
     k->init = pl190_init;
218e99
-    dc->no_user = 1;
218e99
+    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
     dc->reset = pl190_reset;
218e99
     dc->vmsd = &vmstate_pl190;
218e99
 }
218e99
diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c
218e99
index 7860b17..a87a841 100644
218e99
--- a/hw/isa/isa-bus.c
218e99
+++ b/hw/isa/isa-bus.c
218e99
@@ -217,7 +217,7 @@ static void isabus_bridge_class_init(ObjectClass *klass, void *data)
218e99
 
218e99
     k->init = isabus_bridge_init;
218e99
     dc->fw_name = "isa";
218e99
-    dc->no_user = 1;
218e99
+    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
 }
218e99
 
218e99
 static const TypeInfo isabus_bridge_info = {
218e99
diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c
218e99
index 2760dce..580e9ac 100644
218e99
--- a/hw/isa/lpc_ich9.c
218e99
+++ b/hw/isa/lpc_ich9.c
218e99
@@ -603,7 +603,7 @@ static void ich9_lpc_class_init(ObjectClass *klass, void *data)
218e99
     dc->reset = ich9_lpc_reset;
218e99
     k->init = ich9_lpc_initfn;
218e99
     dc->vmsd = &vmstate_ich9_lpc;
218e99
-    dc->no_user = 1;
218e99
+    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
     k->config_write = ich9_lpc_config_write;
218e99
     dc->desc = "ICH9 LPC bridge";
218e99
     k->vendor_id = PCI_VENDOR_ID_INTEL;
218e99
diff --git a/hw/isa/piix4.c b/hw/isa/piix4.c
218e99
index d750413..10bf8ff 100644
218e99
--- a/hw/isa/piix4.c
218e99
+++ b/hw/isa/piix4.c
218e99
@@ -113,7 +113,7 @@ static void piix4_class_init(ObjectClass *klass, void *data)
218e99
     k->device_id = PCI_DEVICE_ID_INTEL_82371AB_0;
218e99
     k->class_id = PCI_CLASS_BRIDGE_ISA;
218e99
     dc->desc = "ISA bridge";
218e99
-    dc->no_user = 1;
218e99
+    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
     dc->vmsd = &vmstate_piix4;
218e99
 }
218e99
 
218e99
diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c
218e99
index 79057a6..563e154 100644
218e99
--- a/hw/isa/vt82c686.c
218e99
+++ b/hw/isa/vt82c686.c
218e99
@@ -468,7 +468,7 @@ static void via_class_init(ObjectClass *klass, void *data)
218e99
     k->class_id = PCI_CLASS_BRIDGE_ISA;
218e99
     k->revision = 0x40;
218e99
     dc->desc = "ISA bridge";
218e99
-    dc->no_user = 1;
218e99
+    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
     dc->vmsd = &vmstate_via;
218e99
 }
218e99
 
218e99
diff --git a/hw/misc/arm_l2x0.c b/hw/misc/arm_l2x0.c
218e99
index eb4427d..2b19e34 100644
218e99
--- a/hw/misc/arm_l2x0.c
218e99
+++ b/hw/misc/arm_l2x0.c
218e99
@@ -174,7 +174,7 @@ static void l2x0_class_init(ObjectClass *klass, void *data)
218e99
 
218e99
     k->init = l2x0_priv_init;
218e99
     dc->vmsd = &vmstate_l2x0;
218e99
-    dc->no_user = 1;
218e99
+    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
     dc->props = l2x0_properties;
218e99
     dc->reset = l2x0_priv_reset;
218e99
 }
218e99
diff --git a/hw/misc/pvpanic.c b/hw/misc/pvpanic.c
218e99
index 31e1b1d..af4a8b2 100644
218e99
--- a/hw/misc/pvpanic.c
218e99
+++ b/hw/misc/pvpanic.c
218e99
@@ -125,7 +125,7 @@ static void pvpanic_isa_class_init(ObjectClass *klass, void *data)
218e99
     ISADeviceClass *ic = ISA_DEVICE_CLASS(klass);
218e99
 
218e99
     ic->init = pvpanic_isa_initfn;
218e99
-    dc->no_user = 1;
218e99
+    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
     dc->props = pvpanic_isa_properties;
218e99
 }
218e99
 
218e99
diff --git a/hw/misc/vmport.c b/hw/misc/vmport.c
218e99
index c146129..ab7adf1 100644
218e99
--- a/hw/misc/vmport.c
218e99
+++ b/hw/misc/vmport.c
218e99
@@ -156,7 +156,7 @@ static void vmport_class_initfn(ObjectClass *klass, void *data)
218e99
     DeviceClass *dc = DEVICE_CLASS(klass);
218e99
     ISADeviceClass *ic = ISA_DEVICE_CLASS(klass);
218e99
     ic->init = vmport_initfn;
218e99
-    dc->no_user = 1;
218e99
+    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
 }
218e99
 
218e99
 static const TypeInfo vmport_info = {
218e99
diff --git a/hw/nvram/fw_cfg.c b/hw/nvram/fw_cfg.c
218e99
index 1a7e49c..155edd4 100644
218e99
--- a/hw/nvram/fw_cfg.c
218e99
+++ b/hw/nvram/fw_cfg.c
218e99
@@ -559,7 +559,7 @@ static void fw_cfg_class_init(ObjectClass *klass, void *data)
218e99
     SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
218e99
 
218e99
     k->init = fw_cfg_init1;
218e99
-    dc->no_user = 1;
218e99
+    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
     dc->reset = fw_cfg_reset;
218e99
     dc->vmsd = &vmstate_fw_cfg;
218e99
     dc->props = fw_cfg_properties;
218e99
diff --git a/hw/pci-host/bonito.c b/hw/pci-host/bonito.c
218e99
index 974150b..b73359e 100644
218e99
--- a/hw/pci-host/bonito.c
218e99
+++ b/hw/pci-host/bonito.c
218e99
@@ -811,7 +811,7 @@ static void bonito_class_init(ObjectClass *klass, void *data)
218e99
     k->revision = 0x01;
218e99
     k->class_id = PCI_CLASS_BRIDGE_HOST;
218e99
     dc->desc = "Host bridge";
218e99
-    dc->no_user = 1;
218e99
+    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
     dc->vmsd = &vmstate_bonito;
218e99
 }
218e99
 
218e99
@@ -828,7 +828,7 @@ static void bonito_pcihost_class_init(ObjectClass *klass, void *data)
218e99
     SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
218e99
 
218e99
     k->init = bonito_pcihost_initfn;
218e99
-    dc->no_user = 1;
218e99
+    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
 }
218e99
 
218e99
 static const TypeInfo bonito_pcihost_info = {
218e99
diff --git a/hw/pci-host/grackle.c b/hw/pci-host/grackle.c
218e99
index 69344d9..5eb2840 100644
218e99
--- a/hw/pci-host/grackle.c
218e99
+++ b/hw/pci-host/grackle.c
218e99
@@ -130,7 +130,7 @@ static void grackle_pci_class_init(ObjectClass *klass, void *data)
218e99
     k->device_id = PCI_DEVICE_ID_MOTOROLA_MPC106;
218e99
     k->revision  = 0x00;
218e99
     k->class_id  = PCI_CLASS_BRIDGE_HOST;
218e99
-    dc->no_user = 1;
218e99
+    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
 }
218e99
 
218e99
 static const TypeInfo grackle_pci_info = {
218e99
@@ -146,7 +146,7 @@ static void pci_grackle_class_init(ObjectClass *klass, void *data)
218e99
     DeviceClass *dc = DEVICE_CLASS(klass);
218e99
 
218e99
     k->init = pci_grackle_init_device;
218e99
-    dc->no_user = 1;
218e99
+    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
 }
218e99
 
218e99
 static const TypeInfo grackle_pci_host_info = {
218e99
diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c
218e99
index f9e68c3..b9c2dcf 100644
218e99
--- a/hw/pci-host/piix.c
218e99
+++ b/hw/pci-host/piix.c
218e99
@@ -564,7 +564,7 @@ static void piix3_class_init(ObjectClass *klass, void *data)
218e99
 
218e99
     dc->desc        = "ISA bridge";
218e99
     dc->vmsd        = &vmstate_piix3;
218e99
-    dc->no_user     = 1,
218e99
+    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
     k->no_hotplug   = 1;
218e99
     k->init         = piix3_initfn;
218e99
     k->config_write = piix3_write_config;
218e99
@@ -588,7 +588,7 @@ static void piix3_xen_class_init(ObjectClass *klass, void *data)
218e99
 
218e99
     dc->desc        = "ISA bridge";
218e99
     dc->vmsd        = &vmstate_piix3;
218e99
-    dc->no_user     = 1;
218e99
+    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
     k->no_hotplug   = 1;
218e99
     k->init         = piix3_initfn;
218e99
     k->config_write = piix3_write_config_xen;
218e99
@@ -618,7 +618,7 @@ static void i440fx_class_init(ObjectClass *klass, void *data)
218e99
     k->revision = 0x02;
218e99
     k->class_id = PCI_CLASS_BRIDGE_HOST;
218e99
     dc->desc = "Host bridge";
218e99
-    dc->no_user = 1;
218e99
+    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
     dc->vmsd = &vmstate_i440fx;
218e99
 }
218e99
 
218e99
@@ -636,7 +636,7 @@ static void i440fx_pcihost_class_init(ObjectClass *klass, void *data)
218e99
 
218e99
     k->init = i440fx_pcihost_initfn;
218e99
     dc->fw_name = "pci";
218e99
-    dc->no_user = 1;
218e99
+    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
 }
218e99
 
218e99
 static const TypeInfo i440fx_pcihost_info = {
218e99
diff --git a/hw/pci-host/prep.c b/hw/pci-host/prep.c
218e99
index 8c4e6eb..eec538e 100644
218e99
--- a/hw/pci-host/prep.c
218e99
+++ b/hw/pci-host/prep.c
218e99
@@ -196,7 +196,7 @@ static void raven_class_init(ObjectClass *klass, void *data)
218e99
     k->class_id = PCI_CLASS_BRIDGE_HOST;
218e99
     dc->desc = "PReP Host Bridge - Motorola Raven";
218e99
     dc->vmsd = &vmstate_raven;
218e99
-    dc->no_user = 1;
218e99
+    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
 }
218e99
 
218e99
 static const TypeInfo raven_info = {
218e99
@@ -213,7 +213,7 @@ static void raven_pcihost_class_init(ObjectClass *klass, void *data)
218e99
     set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
218e99
     dc->realize = raven_pcihost_realizefn;
218e99
     dc->fw_name = "pci";
218e99
-    dc->no_user = 1;
218e99
+    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
 }
218e99
 
218e99
 static const TypeInfo raven_pcihost_info = {
218e99
diff --git a/hw/ppc/spapr_vio.c b/hw/ppc/spapr_vio.c
218e99
index 1405c32..42b6367 100644
218e99
--- a/hw/ppc/spapr_vio.c
218e99
+++ b/hw/ppc/spapr_vio.c
218e99
@@ -533,7 +533,7 @@ static void spapr_vio_bridge_class_init(ObjectClass *klass, void *data)
218e99
     SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
218e99
 
218e99
     k->init = spapr_vio_bridge_init;
218e99
-    dc->no_user = 1;
218e99
+    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
 }
218e99
 
218e99
 static const TypeInfo spapr_vio_bridge_info = {
218e99
diff --git a/hw/s390x/ipl.c b/hw/s390x/ipl.c
218e99
index d69adb2..f86a4af 100644
218e99
--- a/hw/s390x/ipl.c
218e99
+++ b/hw/s390x/ipl.c
218e99
@@ -181,7 +181,7 @@ static void s390_ipl_class_init(ObjectClass *klass, void *data)
218e99
     k->init = s390_ipl_init;
218e99
     dc->props = s390_ipl_properties;
218e99
     dc->reset = s390_ipl_reset;
218e99
-    dc->no_user = 1;
218e99
+    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
 }
218e99
 
218e99
 static const TypeInfo s390_ipl_info = {
218e99
diff --git a/hw/s390x/s390-virtio-bus.c b/hw/s390x/s390-virtio-bus.c
218e99
index 207eb82..9078bfb 100644
218e99
--- a/hw/s390x/s390-virtio-bus.c
218e99
+++ b/hw/s390x/s390-virtio-bus.c
218e99
@@ -679,7 +679,7 @@ static void s390_virtio_bridge_class_init(ObjectClass *klass, void *data)
218e99
     SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
218e99
 
218e99
     k->init = s390_virtio_bridge_init;
218e99
-    dc->no_user = 1;
218e99
+    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
 }
218e99
 
218e99
 static const TypeInfo s390_virtio_bridge_info = {
218e99
diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
218e99
index de51589..74eb559 100644
218e99
--- a/hw/s390x/virtio-ccw.c
218e99
+++ b/hw/s390x/virtio-ccw.c
218e99
@@ -1075,7 +1075,7 @@ static void virtual_css_bridge_class_init(ObjectClass *klass, void *data)
218e99
     SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
218e99
 
218e99
     k->init = virtual_css_bridge_init;
218e99
-    dc->no_user = 1;
218e99
+    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
 }
218e99
 
218e99
 static const TypeInfo virtual_css_bridge_info = {
218e99
diff --git a/hw/sd/pl181.c b/hw/sd/pl181.c
218e99
index 2527296..95e4587 100644
218e99
--- a/hw/sd/pl181.c
218e99
+++ b/hw/sd/pl181.c
218e99
@@ -497,7 +497,7 @@ static void pl181_class_init(ObjectClass *klass, void *data)
218e99
     sdc->init = pl181_init;
218e99
     k->vmsd = &vmstate_pl181;
218e99
     k->reset = pl181_reset;
218e99
-    k->no_user = 1;
218e99
+    k->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
 }
218e99
 
218e99
 static const TypeInfo pl181_info = {
218e99
diff --git a/hw/timer/arm_mptimer.c b/hw/timer/arm_mptimer.c
218e99
index 317f5e4..6b088fa 100644
218e99
--- a/hw/timer/arm_mptimer.c
218e99
+++ b/hw/timer/arm_mptimer.c
218e99
@@ -290,7 +290,7 @@ static void arm_mptimer_class_init(ObjectClass *klass, void *data)
218e99
     sbc->init = arm_mptimer_init;
218e99
     dc->vmsd = &vmstate_arm_mptimer;
218e99
     dc->reset = arm_mptimer_reset;
218e99
-    dc->no_user = 1;
218e99
+    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
     dc->props = arm_mptimer_properties;
218e99
 }
218e99
 
218e99
diff --git a/hw/timer/hpet.c b/hw/timer/hpet.c
218e99
index 95dd01d..3f7f457 100644
218e99
--- a/hw/timer/hpet.c
218e99
+++ b/hw/timer/hpet.c
218e99
@@ -739,7 +739,7 @@ static void hpet_device_class_init(ObjectClass *klass, void *data)
218e99
     SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
218e99
 
218e99
     k->init = hpet_init;
218e99
-    dc->no_user = 1;
218e99
+    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
     dc->reset = hpet_reset;
218e99
     dc->vmsd = &vmstate_hpet;
218e99
     dc->props = hpet_device_properties;
218e99
diff --git a/hw/timer/i8254_common.c b/hw/timer/i8254_common.c
218e99
index f6f9d26..8f01313 100644
218e99
--- a/hw/timer/i8254_common.c
218e99
+++ b/hw/timer/i8254_common.c
218e99
@@ -291,7 +291,7 @@ static void pit_common_class_init(ObjectClass *klass, void *data)
218e99
 
218e99
     ic->init = pit_init_common;
218e99
     dc->vmsd = &vmstate_pit_common;
218e99
-    dc->no_user = 1;
218e99
+    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
 }
218e99
 
218e99
 static const TypeInfo pit_common_type = {
218e99
diff --git a/hw/timer/m48t59.c b/hw/timer/m48t59.c
218e99
index 45753d8..e536bb9 100644
218e99
--- a/hw/timer/m48t59.c
218e99
+++ b/hw/timer/m48t59.c
218e99
@@ -740,7 +740,7 @@ static void m48t59_isa_class_init(ObjectClass *klass, void *data)
218e99
     DeviceClass *dc = DEVICE_CLASS(klass);
218e99
     ISADeviceClass *ic = ISA_DEVICE_CLASS(klass);
218e99
     ic->init = m48t59_init_isa1;
218e99
-    dc->no_user = 1;
218e99
+    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
     dc->reset = m48t59_reset_isa;
218e99
     dc->props = m48t59_isa_properties;
218e99
 }
218e99
diff --git a/hw/timer/mc146818rtc.c b/hw/timer/mc146818rtc.c
218e99
index 481604d..7a70556 100644
218e99
--- a/hw/timer/mc146818rtc.c
218e99
+++ b/hw/timer/mc146818rtc.c
218e99
@@ -904,7 +904,7 @@ static void rtc_class_initfn(ObjectClass *klass, void *data)
218e99
     DeviceClass *dc = DEVICE_CLASS(klass);
218e99
     ISADeviceClass *ic = ISA_DEVICE_CLASS(klass);
218e99
     ic->init = rtc_initfn;
218e99
-    dc->no_user = 1;
218e99
+    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
     dc->vmsd = &vmstate_rtc;
218e99
     dc->props = mc146818rtc_properties;
218e99
 }
218e99
diff --git a/hw/timer/pl031.c b/hw/timer/pl031.c
218e99
index 764940b..aa9c5a6 100644
218e99
--- a/hw/timer/pl031.c
218e99
+++ b/hw/timer/pl031.c
218e99
@@ -246,7 +246,7 @@ static void pl031_class_init(ObjectClass *klass, void *data)
218e99
     SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
218e99
 
218e99
     k->init = pl031_init;
218e99
-    dc->no_user = 1;
218e99
+    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
     dc->vmsd = &vmstate_pl031;
218e99
 }
218e99
 
218e99
diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h
218e99
index a8618db..44feb54 100644
218e99
--- a/include/hw/qdev-core.h
218e99
+++ b/include/hw/qdev-core.h
218e99
@@ -97,7 +97,18 @@ typedef struct DeviceClass {
218e99
     const char *fw_name;
218e99
     const char *desc;
218e99
     Property *props;
218e99
-    int no_user;
218e99
+
218e99
+    /*
218e99
+     * Shall we hide this device model from -device / device_add?
218e99
+     * All devices should support instantiation with device_add, and
218e99
+     * this flag should not exist.  But we're not there, yet.  Some
218e99
+     * devices fail to instantiate with cryptic error messages.
218e99
+     * Others instantiate, but don't work.  Exposing users to such
218e99
+     * behavior would be cruel; this flag serves to protect them.  It
218e99
+     * should never be set without a comment explaining why it is set.
218e99
+     * TODO remove once we're there
218e99
+     */
218e99
+    bool cannot_instantiate_with_device_add_yet;
218e99
 
218e99
     /* callbacks */
218e99
     void (*reset)(DeviceState *dev);
218e99
diff --git a/qdev-monitor.c b/qdev-monitor.c
218e99
index aa6a261..f54cb21 100644
218e99
--- a/qdev-monitor.c
218e99
+++ b/qdev-monitor.c
218e99
@@ -87,7 +87,7 @@ static void qdev_print_devinfo(DeviceClass *dc)
218e99
     if (dc->desc) {
218e99
         error_printf(", desc \"%s\"", dc->desc);
218e99
     }
218e99
-    if (dc->no_user) {
218e99
+    if (dc->cannot_instantiate_with_device_add_yet) {
218e99
         error_printf(", no-user");
218e99
     }
218e99
     error_printf("\n");
218e99
@@ -127,7 +127,8 @@ static void qdev_print_devinfos(bool show_no_user)
218e99
             if ((i < DEVICE_CATEGORY_MAX
218e99
                  ? !test_bit(i, dc->categories)
218e99
                  : !bitmap_empty(dc->categories, DEVICE_CATEGORY_MAX))
218e99
-                || (!show_no_user && dc->no_user)) {
218e99
+                || (!show_no_user
218e99
+                    && dc->cannot_instantiate_with_device_add_yet)) {
218e99
                 continue;
218e99
             }
218e99
             if (!cat_printed) {
218e99
diff --git a/qom/cpu.c b/qom/cpu.c
218e99
index b25fbc9..f97e1b8 100644
218e99
--- a/qom/cpu.c
218e99
+++ b/qom/cpu.c
218e99
@@ -210,7 +210,7 @@ static void cpu_class_init(ObjectClass *klass, void *data)
218e99
     k->write_elf64_qemunote = cpu_common_write_elf64_qemunote;
218e99
     k->write_elf64_note = cpu_common_write_elf64_note;
218e99
     dc->realize = cpu_common_realizefn;
218e99
-    dc->no_user = 1;
218e99
+    dc->cannot_instantiate_with_device_add_yet = true; /* FIXME explain why */
218e99
 }
218e99
 
218e99
 static const TypeInfo cpu_type_info = {
218e99
-- 
218e99
1.7.1
218e99