qemu-e2k/hw/acpi
Igor Mammedov 76bdd24ec0 pc: acpi: cpuhp-legacy: switch ProcessorID to possible_cpus idx
In legacy cpu-hotplug ProcessorID == APIC ID is used
in MADT and cpu-hotplug AML. It was fine as both
are 8bit and unique. Spec depricated Processor()
with corresponding ProcessorID and advises to use
Device() and UID instead of it.

However UID is just 32bit and it can't fit ARM's
arch_id(MPIDR) which is 64bit. Also in case of
sparse arch_id() distribution, managment/lookup
of maps by arch_id(APIC ID/MPIDR) becomes complex
and expensive.

In preparation to common CPU hotplug with ARM
and to simplify lookup in possible_cpus[] map
switch ProcessorID to possible_cpus index in
MADT.

Legacy cpu-hotplug considerations:
HW interface of it is APIC ID based bitmask so
it's impossible to change, also CPON package in
AML also APIC ID based as well all the methods.

To avoid massive rewrite of AML keep is so and
just break assumption that ProcessorID == APIC ID,
ammending CPU_MAT_METHOD to accept APIC ID and
possible_cpus index, it needs them both to patch
MADT entry template. Also switch to possible_cpus
index Processor(ProcessorID) AML.
That way changes to MADT/AML are minimal and kept
inside AML/MADT not affecting external interfaces.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2016-06-07 15:36:54 +03:00
..
Makefile.objs pc: acpi: consolidate legacy CPU hotplug in one file 2016-06-07 15:36:54 +03:00
acpi_interface.c x86: Clean up includes 2016-01-29 15:07:22 +00:00
aml-build.c acpi: add aml_refof() 2016-06-07 15:36:54 +03:00
bios-linker-loader.c acpi: fix bios linker loadder COMMAND_ALLOCATE on bigendian host 2016-05-01 15:42:13 +03:00
core.c qemu-common: stop including qemu/host-utils.h from qemu-common.h 2016-05-19 16:42:28 +02:00
cpu_hotplug.c pc: acpi: cpuhp-legacy: switch ProcessorID to possible_cpus idx 2016-06-07 15:36:54 +03:00
ich9.c pc: acpi: mark current CPU hotplug functions as legacy 2016-06-07 15:36:54 +03:00
memory_hotplug.c x86: Clean up includes 2016-01-29 15:07:22 +00:00
memory_hotplug_acpi_table.c x86: Clean up includes 2016-01-29 15:07:22 +00:00
nvdimm.c acpi: do not use TARGET_PAGE_SIZE 2016-05-19 16:42:28 +02:00
pcihp.c include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00
piix4.c pc: acpi: mark current CPU hotplug functions as legacy 2016-06-07 15:36:54 +03:00
tco.c x86: Clean up includes 2016-01-29 15:07:22 +00:00