]> git.proxmox.com Git - mirror_qemu.git/commit
sysbus: Make devices picking up backends unavailable with -device
authorMarkus Armbruster <armbru@redhat.com>
Mon, 23 Mar 2015 18:34:40 +0000 (19:34 +0100)
committerMarkus Armbruster <armbru@redhat.com>
Thu, 2 Apr 2015 13:30:44 +0000 (15:30 +0200)
commit9f9bdf43cac28251f8cb33b77fed5e19225375c4
tree4df7cb9fdf22ebec1bc10a049efff6af25023581
parent19109131ca2701de1b4e083bd51172f376f7a5ef
sysbus: Make devices picking up backends unavailable with -device

Device models aren't supposed to go on fishing expeditions for
backends.  They should expose suitable properties for the user to set.
For onboard devices, board code sets them.

A number of sysbus devices pick up block backends in their init() /
instance_init() methods with drive_get_next() instead: sl-nand,
milkymist-memcard, pl181, generic-sdhci.

Likewise, a number of sysbus devices pick up character backends in
their init() / realize() methods with qemu_char_get_next_serial():
cadence_uart, digic-uart, etraxfs,serial, lm32-juart, lm32-uart,
milkymist-uart, pl011, stm32f2xx-usart, xlnx.xps-uartlite.

All these mistakes are already marked FIXME.  See the commit that
added these FIXMEs for a more detailed explanation of what's wrong.

Fortunately, only machines ppce500 and pseries-* support -device with
sysbus devices, and none of the devices above is supported with these
machines.

Set cannot_instantiate_with_device_add_yet to preserve our luck.

Cc: Andrzej Zaborowski <balrogg@gmail.com>
Cc: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Cc: Antony Pavlov <antonynpavlov@gmail.com>
Cc: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
Cc: Michael Walle <michael@walle.cc>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
13 files changed:
hw/arm/spitz.c
hw/char/cadence_uart.c
hw/char/digic-uart.c
hw/char/etraxfs_ser.c
hw/char/lm32_juart.c
hw/char/lm32_uart.c
hw/char/milkymist-uart.c
hw/char/pl011.c
hw/char/stm32f2xx_usart.c
hw/char/xilinx_uartlite.c
hw/sd/milkymist-memcard.c
hw/sd/pl181.c
hw/sd/sdhci.c