qemu/hw/misc
Markus Armbruster efec3dd631 qdev: Replace no_user by cannot_instantiate_with_device_add_yet
In an ideal world, machines can be built by wiring devices together
with configuration, not code.  Unfortunately, that's not the world we
live in right now.  We still have quite a few devices that need to be
wired up by code.  If you try to device_add such a device, it'll fail
in sometimes mysterious ways.  If you're lucky, you get an
unmysterious immediate crash.

To protect users from such badness, DeviceClass member no_user used to
make device models unavailable with -device / device_add, but that
regressed in commit 18b6dad.  The device model is still omitted from
help, but is available anyway.

Attempts to fix the regression have been rejected with the argument
that the purpose of no_user isn't clear, and it's prone to misuse.

This commit clarifies no_user's purpose.  Anthony suggested to rename
it cannot_instantiate_with_device_add_yet_due_to_internal_bugs, which
I shorten somewhat to keep checkpatch happy.  While there, make it
bool.

Every use of cannot_instantiate_with_device_add_yet gets a FIXME
comment asking for rationale.  The next few commits will clean them
all up, either by providing a rationale, or by getting rid of the use.

With that done, the regression fix is hopefully acceptable.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Marcel Apfelbaum <marcel.a@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-12-23 00:27:22 +01:00
..
macio qom: Pass available size to object_initialize() 2013-08-30 21:15:44 +02:00
a9scu.c a9mpcore: Embed A9SCUState 2013-11-05 17:47:29 +01:00
applesmc.c devices: Associate devices to their logical category 2013-07-29 10:37:09 -05:00
arm11scu.c arm11mpcore: Split off SCU device 2013-11-05 17:47:30 +01:00
arm_integrator_debug.c integrator: fix Linux boot failure by emulating dbg region 2013-10-31 14:00:16 +01:00
arm_l2x0.c qdev: Replace no_user by cannot_instantiate_with_device_add_yet 2013-12-23 00:27:22 +01:00
arm_sysctl.c aio / timers: Switch entire codebase to the new timer API 2013-08-22 19:14:24 +02:00
cbus.c arm: fix location of some include files 2013-04-15 15:16:01 +02:00
debugexit.c devices: Associate devices to their logical category 2013-07-29 10:37:09 -05:00
eccmemctl.c eccmemctl: QOM cast cleanup 2013-07-29 21:06:58 +02:00
exynos4210_pmu.c exynos4210_pmu: QOM cast cleanup 2013-07-29 21:06:58 +02:00
imx_ccm.c imx_ccm: QOM cast cleanup 2013-07-29 21:06:05 +02:00
ivshmem.c hw: set interrupts using pci irq wrappers 2013-10-14 17:11:45 +03:00
lm32_sys.c lm32_sys: QOM cast cleanup 2013-07-29 21:06:58 +02:00
Makefile.objs pcmcia: QOM'ify PCMCIACardState and MicroDriveState 2013-11-05 18:06:52 +01:00
max111x.c hw: move target-independent files to subdirectories 2013-04-08 18:13:12 +02:00
milkymist-hpdmc.c milkymist-hpdmc: QOM cast cleanup 2013-07-29 21:06:58 +02:00
milkymist-pfpu.c milkymist-pfpu: QOM cast cleanup 2013-07-29 21:06:58 +02:00
mst_fpga.c mst_fpga: QOM cast cleanup 2013-07-29 21:06:59 +02:00
omap_clk.c hw: move other devices to hw/misc/, configure with default-configs/ 2013-04-08 18:13:16 +02:00
omap_gpmc.c memory: add owner argument to initialization functions 2013-07-04 17:42:44 +02:00
omap_l4.c memory: add owner argument to initialization functions 2013-07-04 17:42:44 +02:00
omap_sdrc.c memory: add owner argument to initialization functions 2013-07-04 17:42:44 +02:00
omap_tap.c memory: add owner argument to initialization functions 2013-07-04 17:42:44 +02:00
pc-testdev.c devices: Associate devices to their logical category 2013-07-29 10:37:09 -05:00
pci-testdev.c devices: Associate devices to their logical category 2013-07-29 10:37:09 -05:00
puv3_pm.c puv3_pm: QOM cast cleanup 2013-07-29 21:06:59 +02:00
pvpanic.c pc: get rid of builtin pvpanic for "-M pc-1.5" 2013-11-21 17:38:54 +01:00
sga.c devices: Associate devices to their logical category 2013-07-29 10:37:09 -05:00
slavio_misc.c slavio_misc: QOM cast cleanup for APCState 2013-07-29 21:06:59 +02:00
tmp105.c hw: move private headers to hw/ subdirectories. 2013-04-08 18:13:16 +02:00
tmp105.h hw: move private headers to hw/ subdirectories. 2013-04-08 18:13:16 +02:00
vfio.c vfio-pci: Release all MSI-X vectors when disabled 2013-12-06 11:16:40 -07:00
vmport.c qdev: Replace no_user by cannot_instantiate_with_device_add_yet 2013-12-23 00:27:22 +01:00
zynq_slcr.c zynq_slcr: QOM cast cleanup 2013-07-29 21:06:59 +02:00