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.1~rc+dfsg/hw/acpi_piix4.c
===================================================================
--- qemu-kvm-1.1~rc+dfsg.orig/hw/acpi_piix4.c	2012-06-01 01:19:22.000000000 +0000
+++ qemu-kvm-1.1~rc+dfsg/hw/acpi_piix4.c	2012-06-12 19:39:06.980254166 +0000
@@ -613,16 +613,23 @@
 
 void qemu_system_cpu_hot_add(int cpu, int state)
 {
+#if 0
     CPUArchState *env;
+#endif
     PIIX4PMState *s = global_piix4_pm_state;
 
     if (state && !qemu_get_cpu(cpu)) {
+#if 1
+        fprintf(stderr, "cpu hotplug not supported\n");
+        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)
