Description: don't try to hotplug a cpu
 qemu-kvm will end up crashing when qdev finds hotplug is not enabled.  Let's
 instead gracefully refuse.
Author: Serge Hallyn <serge.hallyn@ubuntu.com>
Forwarded: yes
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/878422

Index: qemu-kvm-1.0+noroms/hw/acpi_piix4.c
===================================================================
--- qemu-kvm-1.0+noroms.orig/hw/acpi_piix4.c	2011-12-04 04:38:06.000000000 -0600
+++ qemu-kvm-1.0+noroms/hw/acpi_piix4.c	2011-12-07 13:49:30.354357818 -0600
@@ -589,12 +589,17 @@
     PIIX4PMState *s = global_piix4_pm_state;
 
     if (state && !qemu_get_cpu(cpu)) {
+#if 1
+        fprintf(stderr, "cpu hotplug not supported\n", cpu);
+        return;
+#else
         env = pc_new_cpu(global_cpu_model);
         if (!env) {
             fprintf(stderr, "cpu %d creation failed\n", cpu);
             return;
         }
         env->cpuid_apic_id = cpu;
+#endif
     }
 
     if (state)
