qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] limit guest cpus for kvm enabled builds
@ 2009-04-09 15:47 Bruce Rogers
  2009-04-09 16:05 ` Paul Brook
  0 siblings, 1 reply; 4+ messages in thread
From: Bruce Rogers @ 2009-04-09 15:47 UTC (permalink / raw)
  To: qemu-devel

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 <brogers@novell.com>

--- 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
 };

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-04-09 17:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-09 15:47 [Qemu-devel] [PATCH] limit guest cpus for kvm enabled builds Bruce Rogers
2009-04-09 16:05 ` Paul Brook
2009-04-09 16:44   ` Anthony Liguori
2009-04-09 17:27     ` Bruce Rogers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).