pc: Refuse max_cpus if it results in too large APIC ID
authorEduardo Habkost <ehabkost@redhat.com>
Fri, 14 Mar 2014 19:33:54 +0000 (16:33 -0300)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 18 Mar 2014 14:08:43 +0000 (16:08 +0200)
commitf03bd716a2935532379cff1c71c6f0f399921b70
treeb5285cc052e83fa6466c003b7b9039977fb0d51a
parent798325ed3856bc1e2f2b640b7e0db60044fdddf9
pc: Refuse max_cpus if it results in too large APIC ID

This changes the PC initialization code to reject max_cpus if it results
in an APIC ID that's too large, instead of aborting or erroring out when
it is already too late.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/i386/pc.c