qemu-e2k/hw/acpi
Igor Mammedov f0c9d64a68 pc: pcihp: avoid adding ACPI_PCIHP_PROP_BSEL twice
PCI hotplug for bridges was introduced only since 2.0 however
  acpi_set_bsel()->object_property_add_uint32_ptr(bus, ACPI_PCIHP_PROP_BSEL)
didn't take in account that for legacy mode (1.7) when
PCI hotplug for bridges is unavailable and ACPI_PCIHP_PROP_BSEL property
the only bus "PCI.0' has been created earlier at acpi_pcihp_init() time.

We managed to live with it only because of error rised by adding
a duplicate property in acpi_set_bsel() has been ignored which
resulted in useless leaking of just allocated (int)bus_bsel.

Issue affects only 1.7 machine type as ACPI tables supported by
QEMU were introduced at that time, but there wasn't PCI hotplug
for bridges till the next release (2.0).

Fix it by removing duplicate ACPI_PCIHP_PROP_BSEL intialization
in acpi_pcihp_init() and doing it only in one place acpi_set_pci_info().

PS:
do not ignore error returned by object_property_add_uint32_ptr()
and abort QEMU since it's programming error which should be fixed
instead of being ignored.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reported-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <1470211497-116801-1-git-send-email-imammedo@redhat.com>
Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
[ Marc-André - Remove now unused ACPI_PCIHP_LEGACY_SIZE ]
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2017-03-01 11:51:05 +04:00
..
Makefile.objs acpi: filter based on CONFIG_ACPI_X86 rather than TARGET 2017-01-16 17:52:35 +01:00
acpi-stub.c acpi: filter based on CONFIG_ACPI_X86 rather than TARGET 2017-01-16 17:52:35 +01:00
acpi_interface.c acpi: extend ACPI interface to provide send_event hook 2016-06-07 15:36:54 +03:00
aml-build.c hw/i386: AMD IOMMU IVRS table 2016-09-24 01:02:01 +03:00
bios-linker-loader.c acpi: make bios_linker_loader_add_checksum() API offset based 2016-06-07 15:39:27 +03:00
core.c opts-visitor: Favor new visit_free() function 2016-07-06 10:52:04 +02:00
cpu.c change CPUArchId.cpu type to Object* 2017-02-22 11:28:28 +11:00
cpu_hotplug.c machine: Make possible_cpu_arch_ids() return const pointer 2017-01-23 21:25:37 -02:00
ich9.c memhp: don't generate memory hotplug AML if it's not enabled/supported 2017-01-10 07:03:24 +02:00
ipmi-stub.c stubs: move acpi stubs to hw/acpi 2017-01-16 17:52:35 +01:00
ipmi.c acpi/ipmi: Initialize the fwinfo before fetching it 2016-11-01 19:21:09 +02:00
memory_hotplug.c memhp: move DIMM devices into dedicated scope with related common methods 2017-01-10 07:03:24 +02:00
nvdimm.c nvdimm acpi: introduce NVDIMM_DSM_MEMORY_SIZE 2016-11-15 17:20:37 +02:00
pcihp.c pc: pcihp: avoid adding ACPI_PCIHP_PROP_BSEL twice 2017-03-01 11:51:05 +04:00
piix4.c memhp: don't generate memory hotplug AML if it's not enabled/supported 2017-01-10 07:03:24 +02:00
tco.c hw/acpi/tco.c: fix tco timer stop 2017-02-28 09:03:39 +03:00
trace-events trace-events: fix first line comment in trace-events 2016-08-12 10:36:01 +01:00