qemu-e2k/hw/i386
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
..
kvm kvmclock: add a new function to update env->tsc. 2015-11-05 11:28:10 +01:00
xen xen-platform: Replace assert() with appropriate error reporting 2015-10-26 11:32:24 +00:00
acpi-build.c pc: acpi: switch to AML API composed DSDT 2016-01-09 23:20:19 +02:00
acpi-build.h i386: ACPI table generation code from seabios 2013-10-14 17:48:57 +03:00
intel_iommu_internal.h intel-iommu: add IOTLB using hash table 2014-08-28 23:10:22 +02:00
intel_iommu.c intel_iommu: Add support for translation for devices behind bridges 2015-10-18 10:05:43 +03:00
kvmvapic.c kvmvapic: patch_instruction fix 2014-10-31 11:29:02 +01:00
Makefile.objs pc: acpi: remove unused ASL templates and related blobs/utils 2016-01-09 23:20:19 +02:00
multiboot.c i386: Rename ELF_MACHINE to be x86 specific 2015-09-25 12:04:44 +02:00
multiboot.h refer to FWCfgState explicitly 2013-06-02 18:14:02 +03:00
pc_piix.c isa: Clean up error handling around isa_bus_new() 2016-01-13 11:58:59 +01:00
pc_q35.c pc: Add pc-*-2.6 machine classes 2015-12-22 18:39:19 +02:00
pc_sysfw.c Fix bad error handling after memory_region_init_ram() 2015-09-18 14:39:29 +02:00
pc.c Use error_fatal to simplify obvious fatal errors 2016-01-13 11:58:58 +01:00
pci-assign-load-rom.c pci-assign: do not test path with access() before opening 2015-11-06 15:42:38 +03:00