qemu-e2k/hw/ppc
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
..
e500-ccsr.h
e500.c device_tree: s/qemu_devtree/qemu_fdt globally 2013-12-20 01:58:11 +01:00
e500.h ppc: Don't duplicate QEMUMachineInitArgs in PPCE500Params 2013-08-21 23:22:22 +03:00
e500plat.c device_tree: s/qemu_devtree/qemu_fdt globally 2013-12-20 01:58:11 +01:00
mac_newworld.c hw: Clean up bogus default boot order 2013-08-28 10:16:47 +03:00
mac_oldworld.c hw: Clean up bogus default boot order 2013-08-28 10:16:47 +03:00
mac.h hw/ppc/mac.h: remove unused BIOS_FILENAME definition 2013-12-02 21:18:18 +04:00
Makefile.objs pseries: move interrupt controllers to hw/intc/ 2013-07-11 18:51:23 +02:00
mpc8544_guts.c cpu: Replace cpu_single_env with CPUState current_cpu 2013-07-09 21:20:28 +02:00
mpc8544ds.c device_tree: s/qemu_devtree/qemu_fdt globally 2013-12-20 01:58:11 +01:00
ppc4xx_devs.c memory: add owner argument to initialization functions 2013-07-04 17:42:44 +02:00
ppc4xx_pci.c hw/p*: pass owner to memory_region_init* functions 2013-07-04 17:42:48 +02:00
ppc405_boards.c pc,pci,virtio fixes and cleanups 2013-09-03 12:31:07 -05:00
ppc405_uc.c misc: Replace 'struct QEMUTimer' by 'QEMUTimer' 2013-12-02 21:03:39 +04:00
ppc405.h
ppc440_bamboo.c device_tree: s/qemu_devtree/qemu_fdt globally 2013-12-20 01:58:11 +01:00
ppc_booke.c misc: Replace 'struct QEMUTimer' by 'QEMUTimer' 2013-12-02 21:03:39 +04:00
ppc.c misc: Replace 'struct QEMUTimer' by 'QEMUTimer' 2013-12-02 21:03:39 +04:00
ppce500_spin.c ppce500_spin: QOM cast cleanup 2013-07-29 21:07:00 +02:00
prep.c hw: Clean up bogus default boot order 2013-08-28 10:16:47 +03:00
spapr_events.c spapr-rtas: replace return code constants with macros 2013-12-20 01:57:59 +01:00
spapr_hcall.c spapr-rtas: fix h_rtas parameters reading 2013-10-25 23:25:46 +02:00
spapr_iommu.c PPC: spapr: iommu: rework traces 2013-09-02 10:06:43 +02:00
spapr_pci.c spapr-rtas: replace return code constants with macros 2013-12-20 01:57:59 +01:00
spapr_rtas.c device_tree: s/qemu_devtree/qemu_fdt globally 2013-12-20 01:58:11 +01:00
spapr_vio.c qdev: Replace no_user by cannot_instantiate_with_device_add_yet 2013-12-23 00:27:22 +01:00
spapr.c spapr: limit numa memory regions by ram size 2013-12-20 01:58:14 +01:00
virtex_ml507.c device_tree: s/qemu_devtree/qemu_fdt globally 2013-12-20 01:58:11 +01:00