From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:51560) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RWADK-00038Y-Hm for qemu-devel@nongnu.org; Thu, 01 Dec 2011 12:14:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RWADJ-0004Np-6f for qemu-devel@nongnu.org; Thu, 01 Dec 2011 12:14:26 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:38592) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RWADJ-0004Ne-2Z for qemu-devel@nongnu.org; Thu, 01 Dec 2011 12:14:25 -0500 Received: from cpe-70-123-137-7.austin.res.rr.com ([70.123.137.7] helo=sergelap) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1RWADH-0000Jx-Gf for qemu-devel@nongnu.org; Thu, 01 Dec 2011 17:14:23 +0000 Date: Thu, 1 Dec 2011 11:14:19 -0600 From: Serge Hallyn Message-ID: <20111201171419.GA13585@sergelap> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] [qemu-kvm PATCH 1/1] don't try to hotplug a cpu List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org When you do "cpu_set online" where > current number of cpus, qemu-kvm will end up crashing when qdev finds hotplug is not enabled. Let's instead gracefully refuse. See https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/878422 for the related bug report. Signed-off-by: Serge Hallyn --- hw/acpi_piix4.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c index 1b35707..5e95569 100644 --- a/hw/acpi_piix4.c +++ b/hw/acpi_piix4.c @@ -589,12 +589,17 @@ void qemu_system_cpu_hot_add(int cpu, int state) PIIX4PMState *s = global_piix4_pm_state; if (state && !qemu_get_cpu(cpu)) { +#if 1 + fprintf(stderr, "cpu hotplug not supported\n", cpu); + 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) -- 1.7.5.4