Paolo Bonzini <pbonz...@redhat.com> writes: >> I really can't see why we should tie ourselves into knots to avoid an >> incompatible change here. I seriously doubt anyone will notice if drop >> the mistaken automatic backend pickup so that "-drive if=floppy -device >> i82378 -device pc87312" no longer picks up the floppy. > > Ok, it wasn't too hard to convince me. Let's document the three of them > together. I'll do it tomorrow if you haven't beaten me to it.
I started to do it, then stopped to look for misuse of other kinds of backends. Here are some: * serial_hds[] via qemu_char_get_next_serial() device bus depends on flawed function "cadence_uart" sysbus CONFIG_CADENCE cadence_uart_realize() "digic-uart" sysbus CONFIG_DIGIC digic_uart_realize() "etraxfs,serial" sysbus CONFIG_ETRAXFS etraxfs_ser_init() "lm32-juart" sysbus CONFIG_LM32 m32_juart_init() "lm32-uart" sysbus CONFIG_LM32 lm32_uart_init() "milkymist-uart" sysbus CONFIG_MILKYMIST milkymist_uart_realize() "pl011" sysbus CONFIG_PL011 pl011_realize() "stm32f2xx-usart" sysbus CONFIG_STM32F2XX_USART stm32f2xx_usart_init() "xlnx.xps-uartlite" sysbus CONFIG_XILINX xilinx_uartlite_realize() * serial_hds[] directly device bus depends on flawed function "allwinner-a10" none CONFIG_ALLWINNER_A10 aw_a10_realize() "pc87312" isa CONFIG_PC87312 pc87312_realize() * parallel_hds[] directly device bus depends on flawed function "pc87312" isa CONFIG_PC87312 pc87312_realize() I'll prepare a patch tomorrow that marks them all FIXME, just like the drive_get() misuses. What else needs to be done? * "pc87312" Old news, just more incompatible change to document. * "allwinner-a10" "-nodefaults -serial null -device allwinner-a10" doesn't explode, which means I can't exclude the possibility that this might actually do something useful for someone. I'd say we treat it just like "pc87312": leave alone now, document incompatible change. * Of the sysbus devices only "xlnx.xps-uartlite" seems to be available with the machines that support -device for sysbus devices (ppce500 and pseries-*). When I try to -device it there, I get "Device xlnx.xps-uartlite is not supported by this machine yet." I'll ask Alex to confirm. I'll prepare a patch that sets cannot_instantiate_with_device_add_yet for the unavailable ones to keep them unavailable, just like for the drive_get() abusers. How could this kind of mistake could look like in NIC device models? "allwinner-a10"'s instance_init aw_a10_init() provides a clue: it messes with qemu_check_nic_model(): if (nd_table[0].used) { qemu_check_nic_model(&nd_table[0], TYPE_AW_EMAC); qdev_set_nic_properties(DEVICE(&s->emac), &nd_table[0]); } No other device does that. Without -nodefaults, this fails: -device allwinner-a10: Unsupported NIC model: xgmac I haven't checked all uses of nd_table[].