[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] limit guest cpus for kvm enabled builds
From: |
Bruce Rogers |
Subject: |
[Qemu-devel] [PATCH] limit guest cpus for kvm enabled builds |
Date: |
Thu, 09 Apr 2009 09:47:02 -0600 |
The x86 kvm kernel module limits guest cpu count to 16, but the userspace pc
definition says 255 still. When invoking qemu-kvm with -smp > 16, it prints
some error messages, then segfaults. One of the mistakes is that the error
code from kvm_create_vcpu is ignored in ap_main_loop.
This patch will enforce the limit at initialization time and avoid these
problems from the get go.
Bruce
Signed-off-by: Bruce Rogers <address@hidden>
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -1162,7 +1162,11 @@ QEMUMachine pc_machine = {
.desc = "Standard PC",
.init = pc_init_pci,
.ram_require = VGA_RAM_SIZE + PC_MAX_BIOS_SIZE,
+#ifdef CONFIG_KVM
+ .max_cpus = 16,
+#else
.max_cpus = 255,
+#endif
};
- [Qemu-devel] [PATCH] limit guest cpus for kvm enabled builds,
Bruce Rogers <=