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
..
acpi_interface.c
acpi-stub.c acpi: filter based on CONFIG_ACPI_X86 rather than TARGET 2017-01-16 17:52:35 +01:00
aml-build.c
bios-linker-loader.c
core.c
cpu_hotplug.c machine: Make possible_cpu_arch_ids() return const pointer 2017-01-23 21:25:37 -02:00
cpu.c change CPUArchId.cpu type to Object* 2017-02-22 11:28:28 +11:00
ich9.c
ipmi-stub.c stubs: move acpi stubs to hw/acpi 2017-01-16 17:52:35 +01:00
ipmi.c
Makefile.objs acpi: filter based on CONFIG_ACPI_X86 rather than TARGET 2017-01-16 17:52:35 +01: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
pcihp.c pc: pcihp: avoid adding ACPI_PCIHP_PROP_BSEL twice 2017-03-01 11:51:05 +04:00
piix4.c
tco.c hw/acpi/tco.c: fix tco timer stop 2017-02-28 09:03:39 +03:00
trace-events