qemu/include/hw
Markus Armbruster d10e54329b isa: Clean up error handling around isa_bus_new()
We can have at most one ISA bus.  If you try to create another one,
isa_bus_new() complains to stderr and returns null.

isa_bus_new() is called in two contexts, machine's init() and device's
realize() methods.  Since complaining to stderr is not proper in the
latter context, convert isa_bus_new() to Error.

Machine's init():

* mips_jazz_init(), called from the init() methods of machines
  "magnum" and "pica"

* mips_r4k_init(), the init() method of machine "mips"

* pc_init1() called from the init() methods of non-q35 PC machines

* typhoon_init(), called from clipper_init(), the init() method of
  machine "clipper"

These callers always create the first ISA bus, hence isa_bus_new()
can't fail.  Simply pass &error_abort.

Device's realize():

* i82378_realize(), of PCI device "i82378"

* ich9_lpc_realize(), of PCI device "ICH9-LPC"

* pci_ebus_realize(), of PCI device "ebus"

* piix3_realize(), of PCI device "pci-piix3", abstract parent of
  "PIIX3" and "PIIX3-xen"

* piix4_realize(), of PCI device "PIIX4"

* vt82c686b_realize(), of PCI device "VT82C686B"

Propagate the error.  Note that these devices are typically created
only by machine init() methods with qdev_init_nofail() or similar.  If
we screwed up and created an ISA bus before that call, we now give up
right away.  Before, we'd hobble on, and typically die in
isa_bus_irqs().  Similar if someone finds a way to hot-plug one of
these critters.

Cc: Richard Henderson <rth@twiddle.net>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: "Hervé Poussineau" <hpoussin@reactos.org>
Cc: Aurelien Jarno <aurelien@aurel32.net>
Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
Reviewed-by: Hervé Poussineau <hpoussin@reactos.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <1450370121-5768-11-git-send-email-armbru@redhat.com>
2016-01-13 11:58:59 +01:00
..
acpi pc: acpi: move PIIX4 isa-bridge and pm devices into SSDT 2016-01-09 23:20:18 +02:00
arm i.MX: Add an i.MX25 specific CCM class/instance 2015-12-17 13:37:16 +00:00
audio
block BlockConf: Call backend functions to detect geometry and blocksizes 2015-03-10 14:02:22 +01:00
char i.MX: Split UART emulator in a header file and a source file 2015-08-13 11:26:19 +01:00
cpu icc_bus: drop the unused files 2015-10-02 16:22:02 -03:00
cris
gpio i.MX: add support for lower and upper interrupt in GPIO. 2015-12-17 13:37:13 +00:00
i2c i.MX: Add I2C controller emulator 2015-09-07 10:39:30 +01:00
i386 ppc patch queue 2016-01-11 2016-01-11 11:57:53 +00:00
input
intc arm_gic_kvm: Disable live migration if not supported 2015-10-27 12:00:50 +00:00
ipack
ipmi ipmi: Add a firmware configuration repository 2015-12-22 18:39:19 +02:00
isa isa: Clean up error handling around isa_bus_new() 2016-01-13 11:58:59 +01:00
kvm
lm32 hmp: Name HMP info handler functions hmp_info_SUBCOMMAND() 2015-02-18 11:58:50 +01:00
m68k
mem nvdimm acpi: build ACPI NFIT table 2015-12-22 18:39:20 +02:00
mips net/dp8393x: QOM'ify 2015-06-11 10:13:30 +01:00
misc i.MX: move i.MX31 CCM object to register array 2016-01-11 15:52:18 +00:00
net i.MX: Add FEC Ethernet Emulator 2015-09-07 10:39:30 +01:00
nvram fw_cfg: remove offset argument from callback prototype 2015-12-15 11:45:59 +01:00
pci hw/pxb: introduce pxb-pcie expander for PCIe machines 2015-12-22 17:45:13 +02:00
pci-host q35: Remove MCHPCIState.guest_info field 2015-12-22 17:45:13 +02:00
ppc spapr vio: fix to incomplete QOMify 2016-01-11 15:29:05 +11:00
s390x s390/sclp: store the increment_size in the sclp device 2015-09-07 16:10:44 +02:00
scsi scsi: remove scsi_req_free prototype 2015-12-04 09:39:55 +03:00
sd sdhci: add optional quirk property to disable card insertion/removal interrupts 2015-12-22 16:34:26 +08:00
sh4
smbios smbios: add smbios 3.0 support 2015-09-07 10:39:28 +01:00
sparc QOM infrastructure fixes and device conversions 2015-03-02 13:20:43 +00:00
timer pc: acpi: move HPET from DSDT to SSDT 2016-01-09 23:20:18 +02:00
tricore
unicore32
usb
vfio vfio: Record host IOMMU's available IO page sizes 2015-10-05 12:38:41 -06:00
virtio 9pfs: merge hw/virtio/virtio-9p.h into hw/9pfs/virtio-9p.h 2016-01-08 12:48:11 +05:30
watchdog s390x/watchdog: introduce diag288 watchdog device 2015-06-11 17:45:49 +02:00
xen xen: fix usage of xc_domain_create in domain builder 2015-11-13 17:38:06 +00:00
boards.h Move SET_MACHINE_COMPAT macro to boards.h 2016-01-11 15:29:05 +11:00
bt.h bt: check struct sizes 2015-12-04 09:39:55 +03:00
compat.h vmxnet3: Introduce 'x-disable-pcie' back-compat property 2016-01-11 11:01:35 +08:00
devices.h
elf_ops.h elf: Update EM_MOXIE definition 2015-09-25 12:04:43 +02:00
empty_slot.h
fw-path-provider.h
hotplug.h misc: Fix new typos in comments 2015-01-15 10:44:13 +03:00
hw.h
ide.h
irq.h
loader.h vl: move rom_load_all after machine init done 2015-07-07 11:03:16 +02:00
nmi.h nmi: Implement inject_nmi() for non-monitor context use 2015-06-11 17:45:50 +02:00
pcmcia.h
platform-bus.h
ptimer.h
qdev-core.h qobject: Rename qtype_code to QType 2015-12-17 08:21:28 +01:00
qdev-dma.h
qdev-properties.h hw: Inline the qdev_prop_set_drive_nofail() wrapper 2016-01-13 11:58:58 +01:00
qdev.h
ssi.h
stream.h
sysbus.h sysbus: add irq_routing_notifier 2015-07-06 12:15:14 -06:00
usb.h usb: Remove unused functions 2015-04-30 16:05:48 +03:00