qemu-irix/hw/i386
Igor Mammedov 75e4aa9405 pc: Fix crash when attempting to hotplug CPU with negative ID
QMP command "{ 'execute': 'cpu-add', 'arguments': { 'id': -1 }}" may cause
QEMU SIGSEGV at:
 piix4_cpu_hotplug_req ()
    ...
    g->sts[cpu_id / 8] |= (1 << (cpu_id % 8));
    ...

Since for PC in current implementation id should be in range [0...maxcpus)
and maxcpus is already checked, add check for lower bound and error out
on incorrect value.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
(cherry picked from commit 8de433cb08)

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2013-06-17 18:01:42 -05:00
..
kvm target-i386: Replace cpuid_*features fields with a feature word array 2013-05-02 00:27:55 +02:00
Makefile.objs hw: move hw/kvm/ to hw/i386/kvm 2013-04-08 18:13:16 +02:00
kvmvapic.c kvmvapic: add ioport read accessor 2013-05-06 14:52:26 +03:00
multiboot.c hw: move private headers to hw/ subdirectories. 2013-04-08 18:13:16 +02:00
multiboot.h hw: move private headers to hw/ subdirectories. 2013-04-08 18:13:16 +02:00
pc.c pc: Fix crash when attempting to hotplug CPU with negative ID 2013-06-17 18:01:42 -05:00
pc_piix.c xen: start PCI hole at 0xe0000000 (same as pc_init1 and qemu-xen-traditional) 2013-06-11 17:25:03 -05:00
pc_q35.c Revert "pc: Kill the "use flash device for BIOS unless KVM" misfeature" 2013-05-13 09:52:43 -05:00
smbios.c smbios: Check R in -smbios type=0, release=R parses okay 2013-06-17 18:01:42 -05:00
xen_domainbuild.c hw: move private headers to hw/ subdirectories. 2013-04-08 18:13:16 +02:00
xen_domainbuild.h hw: move private headers to hw/ subdirectories. 2013-04-08 18:13:16 +02:00
xen_machine_pv.c xen_machine_pv: do not create a dummy CPU in machine->init 2013-06-11 16:57:59 -05:00