File: dont-try-to-hotplug-cpu.patch

package info (click to toggle)
qemu-kvm 1.1.2%2Bdfsg-6%2Bdeb7u12
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 43,848 kB
  • sloc: ansic: 606,321; asm: 10,684; sh: 6,663; perl: 4,223; python: 3,802; makefile: 1,076; objc: 843; xml: 409
file content (35 lines) | stat: -rw-r--r-- 1,075 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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)