* [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
* Re: [Qemu-devel] [PATCH] limit guest cpus for kvm enabled builds
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
0 siblings, 1 reply; 4+ messages in thread
From: Paul Brook @ 2009-04-09 16:05 UTC (permalink / raw)
To: qemu-devel; +Cc: Bruce Rogers
On Thursday 09 April 2009, Bruce Rogers wrote:
> 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.
You should fix that bug then.
> This patch will enforce the limit at initialization time and avoid these
> problems from the get go.
No. We still want to support a decent number of cpus when -no-kvm is
specified.
Paul
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] limit guest cpus for kvm enabled builds
2009-04-09 16:05 ` Paul Brook
@ 2009-04-09 16:44 ` Anthony Liguori
2009-04-09 17:27 ` Bruce Rogers
0 siblings, 1 reply; 4+ messages in thread
From: Anthony Liguori @ 2009-04-09 16:44 UTC (permalink / raw)
To: qemu-devel; +Cc: Bruce Rogers
Paul Brook wrote:
> On Thursday 09 April 2009, Bruce Rogers wrote:
>
>> 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.
>>
>
> You should fix that bug then.
>
I don't see the patch on the mailing list yet, but I'm pretty sure your
patch is against kvm-userspace.git as ap_main_loop doesn't exist in
upstream QEMU.
And FWIW, we do properly handle an unsupported -smp value in upstream
QEMU when using KVM.
Regards,
Anthony Liguori
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] limit guest cpus for kvm enabled builds
2009-04-09 16:44 ` Anthony Liguori
@ 2009-04-09 17:27 ` Bruce Rogers
0 siblings, 0 replies; 4+ messages in thread
From: Bruce Rogers @ 2009-04-09 17:27 UTC (permalink / raw)
To: qemu-devel
On 4/9/2009 at 10:44 AM, Anthony Liguori <anthony@codemonkey.ws> wrote:
> Paul Brook wrote:
>> On Thursday 09 April 2009, Bruce Rogers wrote:
>>
>>> 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.
>>>
>>
>> You should fix that bug then.
>>
>
> I don't see the patch on the mailing list yet, but I'm pretty sure your
> patch is against kvm-userspace.git as ap_main_loop doesn't exist in
> upstream QEMU.
>
> And FWIW, we do properly handle an unsupported -smp value in upstream
> QEMU when using KVM.
>
> Regards,
>
> Anthony Liguori
OK thanks.
I've submitted a different patch on kvm mailing list.
- Bruce
^ 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).