qemu-e2k/hw/i386
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
..
kvm qemu-common: push cpu.h inclusion out of qemu-common.h 2016-05-19 16:42:29 +02:00
xen include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00
acpi-build.c pc: acpi: cpuhp-legacy: switch ProcessorID to possible_cpus idx 2016-06-07 15:36:54 +03:00
acpi-build.h Use scripts/clean-includes to drop redundant qemu/typedefs.h 2016-03-22 22:20:16 +01:00
intel_iommu_internal.h intel_iommu: large page support 2016-02-06 20:44:10 +02:00
intel_iommu.c intel_iommu: large page support 2016-02-06 20:44:10 +02:00
kvmvapic.c i386: kvmvapic: initialise imm32 variable 2016-05-23 16:53:43 +02:00
Makefile.objs pc: acpi: remove unused ASL templates and related blobs/utils 2016-01-09 23:20:19 +02:00
multiboot.c hw: explicitly include qemu-common.h and cpu.h 2016-03-22 22:20:17 +01:00
multiboot.h refer to FWCfgState explicitly 2013-06-02 18:14:02 +03:00
pc_piix.c pc: Set CPU model-id on compat_props for pc <= 2.4 2016-05-23 13:19:36 -03:00
pc_q35.c Sort the fw_cfg file list 2016-04-07 19:57:33 +03:00
pc_sysfw.c include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00
pc.c target-i386: add a generic x86 nmi handler 2016-05-23 16:53:46 +02:00
pci-assign-load-rom.c include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00