pc: acpi: SRAT: create only valid processor lapic entries
commit5803fce3891094618ba018ca1b7ba09ce5de9437
authorIgor Mammedov <imammedo@redhat.com>
Fri, 26 Feb 2016 13:59:23 +0000 (26 14:59 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Fri, 11 Mar 2016 14:59:12 +0000 (11 16:59 +0200)
treee4226802ff6b0c32692b3b43687d0b51aaa31726
parent3d3ebcad6a0ff7ceb6dd0f2f678c326968399b18
pc: acpi: SRAT: create only valid processor lapic entries

When APIC IDs are sparse*, in addition to valid LAPIC
entries the SRAT is also filled invalid ones for non
possible APIC IDs.
Fix it by asking machine for all possible APIC IDs
instead of wrongly assuming that all APIC IDs in
range 0..apic_id_limit are possible.

* sparse lapic topology CLI:
     -smp x,sockets=2,cores=3,maxcpus=6
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/i386/acpi-build.c