qemu-e2k/hw
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
..
9pfs virtio-9p: Convert to QOM realize 2013-12-09 21:46:49 +01:00
acpi qdev: Replace no_user by cannot_instantiate_with_device_add_yet 2013-12-23 00:27:22 +01:00
alpha qdev: Replace no_user by cannot_instantiate_with_device_add_yet 2013-12-23 00:27:22 +01:00
arm qdev: Replace no_user by cannot_instantiate_with_device_add_yet 2013-12-23 00:27:22 +01:00
audio qdev: Replace no_user by cannot_instantiate_with_device_add_yet 2013-12-23 00:27:22 +01:00
block qdev: Replace no_user by cannot_instantiate_with_device_add_yet 2013-12-23 00:27:22 +01:00
bt Preparation for usb-bt-dongle conditional build 2013-09-10 11:14:41 +02:00
char hw/arm/digic: add UART support 2013-12-17 20:12:51 +00:00
core roms: Flush icache when writing roms to guest memory 2013-12-20 01:58:03 +01:00
cpu cpu/a9mpcore: Add Global Timer 2013-12-10 13:28:25 +00:00
cris axis_dev88: Don't enforce use of kernel for qtest 2013-11-05 17:47:29 +01:00
display qdev: Replace no_user by cannot_instantiate_with_device_add_yet 2013-12-23 00:27:22 +01:00
dma qdev: Replace no_user by cannot_instantiate_with_device_add_yet 2013-12-23 00:27:22 +01:00
gpio gpio/zaurus: QOM cast cleanup 2013-07-29 21:06:57 +02:00
i2c qdev: Replace no_user by cannot_instantiate_with_device_add_yet 2013-12-23 00:27:22 +01:00
i386 qdev: Replace no_user by cannot_instantiate_with_device_add_yet 2013-12-23 00:27:22 +01:00
ide qdev: Replace no_user by cannot_instantiate_with_device_add_yet 2013-12-23 00:27:22 +01:00
input qdev: Replace no_user by cannot_instantiate_with_device_add_yet 2013-12-23 00:27:22 +01:00
intc qdev: Replace no_user by cannot_instantiate_with_device_add_yet 2013-12-23 00:27:22 +01:00
isa qdev: Replace no_user by cannot_instantiate_with_device_add_yet 2013-12-23 00:27:22 +01:00
lm32 milkymist: Suppress -kernel/-bios/-drive error for qtest 2013-11-05 17:47:29 +01:00
m68k an5206: Don't enforce use of kernel for qtest 2013-11-05 17:47:29 +01:00
microblaze device_tree: s/qemu_devtree/qemu_fdt globally 2013-12-20 01:58:11 +01:00
mips mips jazz: do not raise data bus exception when accessing invalid addresses 2013-11-21 17:39:22 +01:00
misc qdev: Replace no_user by cannot_instantiate_with_device_add_yet 2013-12-23 00:27:22 +01:00
moxie memory: add owner argument to initialization functions 2013-07-04 17:42:44 +02:00
net Merge remote-tracking branch 'bonzini/virtio' into staging 2013-12-13 11:10:33 -08:00
nvram qdev: Replace no_user by cannot_instantiate_with_device_add_yet 2013-12-23 00:27:22 +01:00
openrisc openrisc-timer: Reduce overhead, Separate clock update functions 2013-11-20 21:46:45 +08:00
pci pci: fix pci bridge fw path 2013-12-11 20:11:08 +02:00
pci-bridge hw/pci-bridge: set PCI_INTERRUPT_PIN register before shpc init 2013-10-14 17:11:45 +03:00
pci-host qdev: Replace no_user by cannot_instantiate_with_device_add_yet 2013-12-23 00:27:22 +01:00
pcmcia pcmcia/pxa2xx: QOM'ify PXA2xxPCMCIAState 2013-11-05 18:06:52 +01:00
ppc qdev: Replace no_user by cannot_instantiate_with_device_add_yet 2013-12-23 00:27:22 +01:00
s390x qdev: Replace no_user by cannot_instantiate_with_device_add_yet 2013-12-23 00:27:22 +01:00
scsi Merge remote-tracking branch 'bonzini/virtio' into staging 2013-12-13 11:10:33 -08:00
sd qdev: Replace no_user by cannot_instantiate_with_device_add_yet 2013-12-23 00:27:22 +01:00
sh4 shix: Don't require firmware presence for qtest 2013-11-05 17:47:29 +01:00
sparc sun4m: Add FCode ROM for TCX framebuffer 2013-11-21 17:38:52 +01:00
sparc64 pc,pci,virtio fixes and cleanups 2013-09-03 12:31:07 -05:00
ssi xilinx_spi: QOM cast cleanup 2013-07-29 21:07:01 +02:00
timer qdev: Replace no_user by cannot_instantiate_with_device_add_yet 2013-12-23 00:27:22 +01:00
tpm aio / timers: Untangle include files 2013-08-22 19:10:27 +02:00
unicore32 puv3: Turn puv3_load_kernel() into a no-op for qtest without -kernel 2013-11-05 17:47:28 +01:00
usb Improvements for usb3 bulk stream (usb core, xhci). 2013-12-06 12:54:36 -08:00
virtio virtio: Convert exit to unrealize 2013-12-09 21:46:49 +01:00
watchdog aio / timers: Switch entire codebase to the new timer API 2013-08-22 19:14:24 +02:00
xen xen-pvdevice: make device-id property compulsory 2013-12-01 18:25:48 +00:00
xtensa pc,pci,virtio fixes and cleanups 2013-09-03 12:31:07 -05:00
Makefile.objs pcmcia: QOM'ify PCMCIACardState and MicroDriveState 2013-11-05 18:06:52 +01:00